#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
#
<transform file path=usr.*/man/.+ -> default mangler.man.stability volatile>
# /etc/samba/private should not even be readable fo non-root users.
<transform dir path=etc/samba/private -> default mode 500>
# smbprofiles man
<transform file path=usr/share/man/man1/profiles.1 -> drop>
# General dirs generated in sample-manifest but with bad attribs.
<transform dir path=etc$ -> drop>
<transform dir file link path=opt.* -> drop>
<transform dir path=usr.* -> drop>
<transform dir file path=usr/include/gssapi.* -> drop>
<transform dir path=var$ -> drop>
<transform dir path=var/lib$ -> drop>
# Unit test suite testtools is now the python package
<transform file path=usr/lib/python2.7/vendor-packages/64/samba/samba/external/testtools.* -> drop>
# Samba customized krb5-config
<transform file path=usr/bin/krb5-config -> drop>
# Remove the named files with strange deps breaking the pkglint
<transform file path=usr/lib/python2.7/vendor-packages/samba/samba/subunit/run.* -> drop>
<transform file path=usr/lib/python2.7/vendor-packages/samba/samba/tests/subunitrun.* -> drop>
<transform file path=usr/lib/python2.7/vendor-packages/samba/samba/tests/dcerpc/raw_protocol.* -> drop>
# Oracle HSM (SAMFS) is not yet supported
<transform file path=usr/lib/samba/vfs/samfs.so -> default pkg.depend.bypass-generate .*>
<transform file path=usr/lib/samba/vfs/samfs.so -> default pkg.linted.userland.action001.3 true>
# mediated links macros to switch between Samba 4 and and possibly any forked release
<transform link target=.*/lib/samba/(s)?bin/.+ -> default mediator samba >
<transform link target=.*/lib/samba/(s)?bin/.+ -> default mediator-implementation 4 >
<transform link target=.*/lib/samba/(s)?bin/.+ -> default mediator-priority vendor >
<transform link target=.*/samba/($(MACH64)/)?nss_.+\.so.* -> default mediator samba >
<transform link target=.*/samba/($(MACH64)/)?nss_.+\.so.* -> default mediator-implementation 4 >
<transform link target=.*/samba/($(MACH64)/)?nss_.+\.so.* -> default mediator-priority vendor >
<transform link target=.*/samba/security/($(MACH64)/)?pam_.+\.so -> default mediator samba >
<transform link target=.*/samba/security/($(MACH64)/)?pam_.+\.so -> default mediator-implementation 4 >
<transform link target=.*/samba/security/($(MACH64)/)?pam_.+\.so -> default mediator-priority vendor >
# SMF services import (for .xml manifests)
<transform file path=lib/svc/manifest/.+\.xml -> default restart_fmri svc:/system/manifest-import:default >
# "samba.proto-objects"-file is created using the command:
# gmake sample-manifest METADATA_TEMPLATE=
# as a "sample-manifest"-file (in build/ dir) and is pkgfmt clean
# All individual actions and attribute settings on pkg objects should
# be performed by "<transform ...> (pkgmogrify) actions in "samba.p5m.common".
<include samba.proto-objects>
# pkg attributes
set name=pkg.fmri \
value=pkg:/service/network/samba@$(IPS_COMPONENT_VERSION),$(BUILD_VERSION)
set name=pkg.summary value="samba - A Windows SMB/CIFS fileserver for UNIX"
set name=com.oracle.info.description value="Samba, a SMB/CIFS fileserver"
set name=com.oracle.info.tpno value=$(TPNO)
set name=info.classification \
value="org.opensolaris.category.2008:System/File System"
set name=info.source-url value=$(COMPONENT_ARCHIVE_URL)
set name=info.upstream-url value=$(COMPONENT_PROJECT_URL)
set name=org.opensolaris.arc-caseid value=PSARC/2015/008
set name=org.opensolaris.consolidation value=$(CONSOLIDATION)
# samba confdir
dir path=etc/samba/private mode=500
# pam.conf is now modularized using /etc/pam.d/ which is fine for adding of PAM-using services
# ...but add of new pam_-backend will need further fix.
# pam.conf-winbind is now obsoleted:
#file Solaris/pam.conf-winbind path=etc/pam.d/
# samba confdir
dir path=etc/samba/private mode=500
# service manifests to install
# service method
file Solaris/samba.sh path=lib/svc/method/samba
#
# bin (mediated links)
# Samba CLI (available on standard path) is now frozen (reduced) to original
# Samba 3.6 command-set to be able to handle thwse mediated links by a more
# programmatical way.
# (note) commented links documents the difference between the Samba 3.6 and
# Samba4 CLI. If the Samba4 utility is needed it should be called from its
#
#link path=usr/bin/cifsdd target=../lib/samba/bin/cifsdd target
#link path=usr/bin/dbwrap_tool target=../lib/samba/bin/dbwrap_tool
link path=usr/bin/eventlogadm target=../lib/samba/bin/eventlogadm
#link path=usr/bin/gentest target=../lib/samba/bin/gentest
#link path=usr/bin/ldbadd target=../lib/samba/bin/ldbadd
#link path=usr/bin/ldbdel target=../lib/samba/bin/ldbdel
#link path=usr/bin/ldbedit target=../lib/samba/bin/ldbedit
#link path=usr/bin/ldbmodify target=../lib/samba/bin/ldbmodify
#link path=usr/bin/ldbrename target=../lib/samba/bin/ldbrename
#link path=usr/bin/ldbsearch target=../lib/samba/bin/ldbsearch
#link path=usr/bin/locktest target=../lib/samba/bin/locktest
#link path=usr/bin/masktest target=../lib/samba/bin/masktest
#link path=usr/bin/ndrdump target=../lib/samba/bin/ndrdump
link path=usr/bin/net target=../lib/samba/bin/net
link path=usr/bin/nmblookup target=../lib/samba/bin/nmblookup
#link path=usr/bin/nmblookup4 target=../lib/samba/bin/nmblookup4
#link path=usr/bin/ntdbbackup target=../lib/samba/bin/ntdbbackup
#link path=usr/bin/ntdbdump target=../lib/samba/bin/ntdbdump
#link path=usr/bin/ntdbrestore target=../lib/samba/bin/ntdbrestore
#link path=usr/bin/ntdbtool target=../lib/samba/bin/ntdbtool
link path=usr/bin/ntlm_auth target=../lib/samba/bin/ntlm_auth
#link path=usr/bin/oLschema2ldif target=../lib/samba/bin/oLschema2ldif
link path=usr/bin/pdbedit target=../lib/samba/bin/pdbedit
#link path=usr/bin/pidl target=../lib/samba/bin/pidl
#link path=usr/bin/regdiff target=../lib/samba/bin/regdiff
#link path=usr/bin/regpatch target=../lib/samba/bin/regpatch
#link path=usr/bin/regshell target=../lib/samba/bin/regshell
#link path=usr/bin/regtree target=../lib/samba/bin/regtree
link path=usr/bin/rpcclient target=../lib/samba/bin/rpcclient
link path=usr/bin/sharesec target=../lib/samba/bin/sharesec
link path=usr/bin/smbcacls target=../lib/samba/bin/smbcacls
link path=usr/bin/smbclient target=../lib/samba/bin/smbclient
link path=usr/bin/smbcontrol target=../lib/samba/bin/smbcontrol
link path=usr/bin/smbcquotas target=../lib/samba/bin/smbcquotas
link path=usr/bin/smbget target=../lib/samba/bin/smbget
link path=usr/bin/smbpasswd target=../lib/samba/bin/smbpasswd
link path=usr/bin/smbprofiles target=../lib/samba/bin/profiles
link path=usr/bin/smbspool target=../lib/samba/bin/smbspool
link path=usr/bin/smbstatus target=../lib/samba/bin/smbstatus
link path=usr/bin/smbtar target=../lib/samba/bin/smbtar
link path=usr/bin/smbtorture target=../lib/samba/bin/smbtorture
link path=usr/bin/smbtree target=../lib/samba/bin/smbtree
link path=usr/bin/tdbbackup target=../lib/samba/bin/tdbbackup
link path=usr/bin/tdbdump target=../lib/samba/bin/tdbdump
link path=usr/bin/tdbrestore target=../lib/samba/bin/tdbrestore
link path=usr/bin/tdbtool target=../lib/samba/bin/tdbtool
link path=usr/bin/testparm target=../lib/samba/bin/testparm
link path=usr/bin/wbinfo target=../lib/samba/bin/wbinfo
#
# nss_libs
link path=usr/lib/$(MACH64)/nss_winbind.so.1 \
target=../samba/$(MACH64)/nss_winbind.so.1
link path=usr/lib/nss_winbind.so.1 target=./samba/nss_winbind.so.1
#
# PAM-libs (pam_smbpass was discontinued)
link path=usr/lib/security/$(MACH64)/pam_winbind.so \
target=../../samba/security/$(MACH64)/pam_winbind.so
link path=usr/lib/security/$(MACH64)/pam_winbind.so.1 \
target=../../samba/security/$(MACH64)/pam_winbind.so
link path=usr/lib/security/pam_winbind.so \
target=../samba/security/pam_winbind.so
link path=usr/lib/security/pam_winbind.so.1 \
target=../samba/security/pam_winbind.so
#
# sbin
# (note) SWAT is definitivelly gone in Samba4.
link path=usr/sbin/nmbd target=../lib/samba/sbin/nmbd
link path=usr/sbin/smbd target=../lib/samba/sbin/smbd
link path=usr/sbin/winbindd target=../lib/samba/sbin/winbindd
#
# smbprofiles
#
# dirs not created by install
dir path=var/samba/com
dir path=var/samba/locks
dir path=var/samba/log
dir path=var/spool/samba mode=1777
#
legacy pkg=SUNWsmbar \
desc="samba - A Windows SMB/CIFS fileserver for UNIX (Root)" \
name="samba - A Windows SMB/CIFS fileserver for UNIX (Root)"
legacy pkg=SUNWsmbau \
desc="samba - A Windows SMB/CIFS fileserver for UNIX (Usr)" \
name="samba - A Windows SMB/CIFS fileserver for UNIX (Usr)"
license samba.license license=GPLv3
# Samba can be used in Asian multibyte language envs. so we need this
depend type=require fmri=pkg:/system/library/iconv/extra