Ed Sutter
2015-Jan-21 15:40 UTC
[Samba] question about installing samba and writing VFS module...
On 1/21/2015 10:18 AM, Rowland Penny wrote:> On 21/01/15 15:05, Ed Sutter wrote: >> Hi, >> I'm new to Samba. My goal is to write a VFS module. >> I've been able to do this somewhat successfully; however there must be a better way... >> >> On my first attempt at this, I just installed samba using apt-get and configured >> the system to be a samba server (this worked just fine). >> >> Then, since I wanna build a VFS module, I'm assuming I need to build everything from >> source, create my module (derived from one of the examples) and then install >> everything. >> >> So, I downloaded the latest tarball (at the time that was samba-4.1.14), unpacked >> it and did "./configure, make & sudo make install". This appears to install binaries >> to /usr/local/samba, but does not affect the runtime samba which was pulled in by >> apt-get initially. >> I ended up manually coping all of /usr/local/samba/bin to /usr/bin and /usr/sbin. >> I also had to hack /etc/init.d/smbd and /etc/init.d/nmbd to ignore upstart. >> I was also able to rebuild the full_audit VFS example (with a slight modification) >> and verify that it was working. >> >> Yea, major hack. So now I start over with a few questions... >> >> 1. I assume if I'm modifying a VFS module, I need to build everything and install >> from source right? >> 2. What does "make install" do for me? It doesn't appear to do an install that then >> runs on my next system startup. >> >> Thanks for any help/advice. >> Ed >> >> >> >> >> >> > > Hi, yes, if you compile samba4 yourself then it will all end up in /usr/local/samba, this is the default location, but you can change it. if, instead of running './configure', you run './configure --help' this will show you all the options you can change, by setting the right ones, you can get 'make install' to put the samba binaries etc in the same place as your install. > > Having said that, what is your vfs module going to do and are you going to offer it to samba ?? > > RowlandThanks for the quick response. I had looked at that (./configure --help), but still wasn't sure what to change. For "make install" to do the equivalent of "sudo apt-get install samba" it seems like there are a lot of destination directories (bin, lib, etc). Is there a known set of .configure options that will essentially do what "apt-get install samba" does? Regarding the module... This is for a small embedded system (beaglebone) so that multiple PCs can access various networked files and trigger some switches (gpio pins). Probably not very generically useful; but if I get it working I'll gladly submit it. Ed
Rowland Penny
2015-Jan-21 16:49 UTC
[Samba] question about installing samba and writing VFS module...
On 21/01/15 15:40, Ed Sutter wrote:> On 1/21/2015 10:18 AM, Rowland Penny wrote: >> On 21/01/15 15:05, Ed Sutter wrote: >>> Hi, >>> I'm new to Samba. My goal is to write a VFS module. >>> I've been able to do this somewhat successfully; however there must >>> be a better way... >>> >>> On my first attempt at this, I just installed samba using apt-get >>> and configured >>> the system to be a samba server (this worked just fine). >>> >>> Then, since I wanna build a VFS module, I'm assuming I need to build >>> everything from >>> source, create my module (derived from one of the examples) and then >>> install >>> everything. >>> >>> So, I downloaded the latest tarball (at the time that was >>> samba-4.1.14), unpacked >>> it and did "./configure, make & sudo make install". This appears to >>> install binaries >>> to /usr/local/samba, but does not affect the runtime samba which was >>> pulled in by >>> apt-get initially. >>> I ended up manually coping all of /usr/local/samba/bin to /usr/bin >>> and /usr/sbin. >>> I also had to hack /etc/init.d/smbd and /etc/init.d/nmbd to ignore >>> upstart. >>> I was also able to rebuild the full_audit VFS example (with a slight >>> modification) >>> and verify that it was working. >>> >>> Yea, major hack. So now I start over with a few questions... >>> >>> 1. I assume if I'm modifying a VFS module, I need to build >>> everything and install >>> from source right? >>> 2. What does "make install" do for me? It doesn't appear to do an >>> install that then >>> runs on my next system startup. >>> >>> Thanks for any help/advice. >>> Ed >>> >>> >>> >>> >>> >>> >> >> Hi, yes, if you compile samba4 yourself then it will all end up in >> /usr/local/samba, this is the default location, but you can change >> it. if, instead of running './configure', you run './configure >> --help' this will show you all the options you can change, by setting >> the right ones, you can get 'make install' to put the samba binaries >> etc in the same place as your install. >> >> Having said that, what is your vfs module going to do and are you >> going to offer it to samba ?? >> >> Rowland > Thanks for the quick response. > I had looked at that (./configure --help), but still wasn't sure what > to change. For "make install" to do the equivalent of "sudo apt-get > install samba" it seems like there are a lot of destination > directories (bin, lib, etc). Is there a known set of .configure > options that will essentially do what "apt-get install samba" does? > Regarding the module... > This is for a small embedded system (beaglebone) so that multiple PCs > can access various networked files and trigger some switches (gpio pins). > Probably not very generically useful; but if I get it working I'll > gladly submit it. > Edhaving never used/seen a beaglebone, isn't it something like an raspberry pi, in which case, why don't you install debian wheezy and use backports, this will get you 4.1.11, or you can could use jessie and this will get you 4.1.13. You could then download the source package and rebuild the deb, adding your patches. In any case, I would do the main development work on a PC first, this is bound to be faster, I once compiled S4 on an rpi and it took hours. Rowland
Ed Sutter
2015-Jan-21 17:12 UTC
[Samba] question about installing samba and writing VFS module...
On 1/21/2015 11:49 AM, Rowland Penny wrote:> On 21/01/15 15:40, Ed Sutter wrote: >> On 1/21/2015 10:18 AM, Rowland Penny wrote: >>> On 21/01/15 15:05, Ed Sutter wrote: >>>> Hi, >>>> I'm new to Samba. My goal is to write a VFS module. >>>> I've been able to do this somewhat successfully; however there must be a better way... >>>> >>>> On my first attempt at this, I just installed samba using apt-get and configured >>>> the system to be a samba server (this worked just fine). >>>> >>>> Then, since I wanna build a VFS module, I'm assuming I need to build everything from >>>> source, create my module (derived from one of the examples) and then install >>>> everything. >>>> >>>> So, I downloaded the latest tarball (at the time that was samba-4.1.14), unpacked >>>> it and did "./configure, make & sudo make install". This appears to install binaries >>>> to /usr/local/samba, but does not affect the runtime samba which was pulled in by >>>> apt-get initially. >>>> I ended up manually coping all of /usr/local/samba/bin to /usr/bin and /usr/sbin. >>>> I also had to hack /etc/init.d/smbd and /etc/init.d/nmbd to ignore upstart. >>>> I was also able to rebuild the full_audit VFS example (with a slight modification) >>>> and verify that it was working. >>>> >>>> Yea, major hack. So now I start over with a few questions... >>>> >>>> 1. I assume if I'm modifying a VFS module, I need to build everything and install >>>> from source right? >>>> 2. What does "make install" do for me? It doesn't appear to do an install that then >>>> runs on my next system startup. >>>> >>>> Thanks for any help/advice. >>>> Ed >>>> >>>> >>>> >>>> >>>> >>>> >>> >>> Hi, yes, if you compile samba4 yourself then it will all end up in /usr/local/samba, this is the default location, but you can change it. if, instead of running './configure', you run './configure --help' this will show you all the options you can change, by setting the right ones, you can get 'make install' to put the samba binaries etc in the same place as your install. >>> >>> Having said that, what is your vfs module going to do and are you going to offer it to samba ?? >>> >>> Rowland >> Thanks for the quick response. >> I had looked at that (./configure --help), but still wasn't sure what to change. For "make install" to do the equivalent of "sudo apt-get install samba" it seems like there are a lot of destination directories (bin, lib, etc). Is there a known set of .configure options that will essentially do what "apt-get install samba" does? >> Regarding the module... >> This is for a small embedded system (beaglebone) so that multiple PCs can access various networked files and trigger some switches (gpio pins). >> Probably not very generically useful; but if I get it working I'll gladly submit it. >> Ed > > having never used/seen a beaglebone, isn't it something like an raspberry pi, in which case, why don't you install debian wheezy and use backports, this will get you 4.1.11, or you can could use jessie and this will get you 4.1.13. You could then download the source package and rebuild the deb, adding your patches. > > In any case, I would do the main development work on a PC first, this is bound to be faster, I once compiled S4 on an rpi and it took hours. > > RowlandYea, beaglebone is similar but more powerful than raspberry pi. I did just what you're suggesting. Basically had things working to a point where I wanted to move over to the beaglebone. Its running ubuntu 14.04 now, and I was able to do an "apt-get install samba" onboard. I can also pull down the samba tarball and build it onboard. All good. Now I just need to understand how to install from the source so that it looks the same as "apt-get install samba". This is independent of it being on beaglebone or a PC, so if I knew how to do it on a PC I'd be happy. Here's where I'm confused... 1. Ubuntu uses "upstart", so "apt-get install samba" puts a few .conf files in /etc/init. How do I tell "make install" to do the same? Or, where can I get the *.conf files that should be used here? 2. Based on configure --help, I can change PREFIX and EXEC-PREFIX; but that doesn't work for all paths. For example, if I set PREFIX so that SYSCONFDIR points to "/etc", then INCLUDEDIR points to /include (bad). Does this mean that a "whole bunch" of pre-defined installation directories have to be overridden on the command line? Sorry for all the words, just trying to get through this... Bottom line, if I knew how to configure things so that "make install" would essentially do the same thing as "sudo apt-get install samba" on a ubuntu 14.04 machine, then I'd be a happy camper. Ignore the beaglebone part of this.
Apparently Analagous Threads
- question about installing samba and writing VFS module...
- question about installing samba and writing VFS module...
- question about installing samba and writing VFS module...
- question about installing samba and writing VFS module...
- question about installing samba and writing VFS module...