TritonDataCenter / pkgsrc-legacy

Automatically updated conversion of the "pkgsrc" module from anoncvs.netbsd.org
http://www.pkgsrc.org
127 stars 64 forks source link

2014Q4 samba4 problems #255

Open RSully opened 9 years ago

RSully commented 9 years ago

I spun up a base-64-lts zone (c02a2044-c1bd-11e4-bd8c-dfc1db8b0182) on the current build of SmartOS and ran the following:

pkgin -y update
pkgin -y upgrade
pkgin -y install samba4

Based on the message I saw at the end of installation I figured any setup would be as easy as modifying /opt/local/etc/samba/smb.conf and running svcadm enable -r svc:/pkgsrc/samba4:default. A couple problems I've ran into:

Let me know if there is any more info I can provide or if there is a newer image or version I should be using.

wiedi commented 9 years ago

I see why the first two happen: the samba4 pkg from wip uses the files from samba:

FILESDIR=       ${PKGDIR}/../../net/samba/files

So it picks up the samba 3 SMF manifest.

For issues 1 it is then missing SMF_INSTANCES= smbd nmbd in its makefile (if samba 4 also has these services, i've not checked). But issue 2 sounds like it deserves its own manifest anyway.

drscream commented 9 years ago

I can confirm the issue with samba4. The manifest is wrong or maybe the package isn't build correctly to detect the config file in /opt/local/samba/ (smb.conf). A simple workaround would be to modify the manifest to and specify the config file directly.

<?xml version='1.0'?>
<!DOCTYPE service_bundle SYSTEM '/usr/share/lib/xml/dtd/service_bundle.dtd.1'>
<service_bundle type='manifest' name='export'>
  <service name='pkgsrc/samba4' type='service' version='0'>
    <dependency name='fs-root' grouping='require_all' restart_on='none' type='service'>
      <service_fmri value='svc:/system/filesystem/root'/>
    </dependency>
    <dependency name='network-service' grouping='require_all' restart_on='none' type='service'>
      <service_fmri value='svc:/network/service'/>
    </dependency>
    <instance name='nmbd' enabled='true'>
      <exec_method name='start' type='method' exec='/opt/local/sbin/nmbd -D -s /opt/local/etc/samba/smb.conf' timeout_seconds='0'/>
      <exec_method name='stop' type='method' exec=':kill' timeout_seconds='30'/>
      <exec_method name='refresh' type='method' exec=':kill -HUP' timeout_seconds='0'/>
      <template>
        <common_name>
          <loctext xml:lang='C'>Samba NetBIOS name server</loctext>
        </common_name>
        <documentation>
          <manpage title='nmbd' section='8' manpath='man'/>
        </documentation>
      </template>
    </instance>
    <instance name='smbd' enabled='true'>
      <exec_method name='start' type='method' exec='/opt/local/sbin/smbd -D -s /opt/local/etc/samba/smb.conf' timeout_seconds='0'/>
      <exec_method name='stop' type='method' exec=':kill' timeout_seconds='30'/>
      <exec_method name='refresh' type='method' exec=':kill -HUP' timeout_seconds='0'/>
      <template>
        <common_name>
          <loctext xml:lang='C'>Samba SMB/CIFS services</loctext>
        </common_name>
        <documentation>
          <manpage title='smbd' section='8' manpath='man'/>
        </documentation>
      </template>
    </instance>
    <stability value='Unstable'/>
  </service>
</service_bundle>
RSully commented 9 years ago

I am also seeing "Unable to open printcap file /etc/printcap for read!". In my [global] (I have load printers = no, if that has any relation).

(For the moment I simply symlink'd the conf file as a workaround to get samba4 to enable)