samba: update to 3.6.2, systemd switch.
This commit is contained in:
parent
cc21ec1a79
commit
3595981d20
18 changed files with 149 additions and 78 deletions
|
@ -1 +0,0 @@
|
|||
samba
|
20
srcpkgs/samba/INSTALL
Normal file
20
srcpkgs/samba/INSTALL
Normal file
|
@ -0,0 +1,20 @@
|
|||
case "${ACTION}" in
|
||||
post)
|
||||
# create runtime required dirs.
|
||||
bin/systemd-tmpfiles --create usr/lib/tmpfiles.d/samba.conf
|
||||
cat << _EOF
|
||||
==========================================================================
|
||||
|
||||
To start the Samba SMB/CIFS server:
|
||||
# systemctl start smbd.service
|
||||
|
||||
To start the Samba NETBIOS name server:
|
||||
# systemctl start nmbd.service
|
||||
|
||||
To start the Samba Winbind daemon:
|
||||
# systemctl start winbindd.service
|
||||
|
||||
==========================================================================
|
||||
_EOF
|
||||
;;
|
||||
esac
|
7
srcpkgs/samba/REMOVE
Normal file
7
srcpkgs/samba/REMOVE
Normal file
|
@ -0,0 +1,7 @@
|
|||
case ${ACTION} in
|
||||
purge)
|
||||
[ -d var/samba ] && rm -rf var/samba
|
||||
[ -d var/spool/samba ] && rm -rf var/spool/samba
|
||||
[ -d etc/samba/private ] && rm -rf etc/samba/private
|
||||
;;
|
||||
esac
|
|
@ -1 +0,0 @@
|
|||
libc.so.6
|
|
@ -1,19 +0,0 @@
|
|||
# Template file for 'cifs-utils'.
|
||||
#
|
||||
revision=1
|
||||
short_desc="Common Internet File System utilities"
|
||||
long_desc="
|
||||
The SMB/CIFS protocol provides support for cross-platform file sharing with
|
||||
Microsoft Windows, OS X, and other Unix systems.
|
||||
|
||||
This package provides utilities for managing mounts of CIFS network file
|
||||
systems."
|
||||
|
||||
|
||||
do_install()
|
||||
{
|
||||
install -d ${DESTDIR}/usr/share/man/man8 ${DESTDIR}/usr/sbin
|
||||
mv ${SRCPKGDESTDIR}/usr/sbin/*cifs* ${DESTDIR}/usr/sbin
|
||||
mv ${SRCPKGDESTDIR}/usr/share/man/man8/*cifs* \
|
||||
${DESTDIR}/usr/share/man/man8
|
||||
}
|
8
srcpkgs/samba/files/nmbd.service
Normal file
8
srcpkgs/samba/files/nmbd.service
Normal file
|
@ -0,0 +1,8 @@
|
|||
[Unit]
|
||||
Description=Samba NetBIOS name server
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/sbin/nmbd -F
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
10
srcpkgs/samba/files/samba.logrotate
Normal file
10
srcpkgs/samba/files/samba.logrotate
Normal file
|
@ -0,0 +1,10 @@
|
|||
/var/log/samba/*.log /var/log/samba/log.* {
|
||||
notifempty
|
||||
missingok
|
||||
sharedscripts
|
||||
copytruncate
|
||||
postrotate
|
||||
/bin/systemctl try-restart smbd.service nmbd.service winbindd.service \
|
||||
2>/dev/null || true
|
||||
endscript
|
||||
}
|
3
srcpkgs/samba/files/samba.pam
Normal file
3
srcpkgs/samba/files/samba.pam
Normal file
|
@ -0,0 +1,3 @@
|
|||
auth required pam_unix.so
|
||||
account required pam_unix.so
|
||||
session required pam_unix.so
|
7
srcpkgs/samba/files/samba.tmpfiles
Normal file
7
srcpkgs/samba/files/samba.tmpfiles
Normal file
|
@ -0,0 +1,7 @@
|
|||
# Required directories at runtime by samba.
|
||||
d /run/samba 0755 root root - -
|
||||
d /run/samba/socket 0755 root root - -
|
||||
d /etc/samba/private 0700 root root - -
|
||||
d /var/samba 0750 root root - -
|
||||
d /var/spool/samba 1777 root root - -
|
||||
d /var/log/samba 0750 root root - -
|
9
srcpkgs/samba/files/smbd.service
Normal file
9
srcpkgs/samba/files/smbd.service
Normal file
|
@ -0,0 +1,9 @@
|
|||
[Unit]
|
||||
Description=Samba SMB/CIFS server
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/sbin/smbd -F
|
||||
ExecReload=/bin/kill -HUP $MAINPID
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
9
srcpkgs/samba/files/winbindd.service
Normal file
9
srcpkgs/samba/files/winbindd.service
Normal file
|
@ -0,0 +1,9 @@
|
|||
[Unit]
|
||||
Description=Samba Winbind daemon
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/sbin/winbindd -F
|
||||
ExecReload=/bin/kill -HUP $MAINPID
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
|
@ -12,3 +12,4 @@ libldap-2.4.so.2
|
|||
liblber-2.4.so.2
|
||||
libz.so.1
|
||||
libpthread.so.0
|
||||
librt.so.1
|
||||
|
|
|
@ -5,14 +5,8 @@ long_desc="
|
|||
This package provides a shared library that enables client applications to
|
||||
talk to Microsoft Windows and Samba servers using the SMB/CIFS protocol."
|
||||
|
||||
|
||||
revision=2
|
||||
|
||||
do_install()
|
||||
{
|
||||
install -d ${DESTDIR}/usr/lib ${DESTDIR}/usr/share/man/man7
|
||||
mv ${SRCPKGDESTDIR}/usr/lib/libwbclient.so* ${DESTDIR}/usr/lib
|
||||
mv ${SRCPKGDESTDIR}/usr/lib/libsmbclient.so* ${DESTDIR}/usr/lib
|
||||
mv ${SRCPKGDESTDIR}/usr/share/man/man7/libsmbclient.7 \
|
||||
${DESTDIR}/usr/share/man/man7
|
||||
do_install() {
|
||||
vmove "usr/lib/libwbclient.so*" usr/lib
|
||||
vmove "usr/lib/libsmbclient.so*" usr/lib
|
||||
vmove usr/share/man/man7/libsmbclient.7 usr/share/man/man7
|
||||
}
|
||||
|
|
|
@ -6,24 +6,8 @@ long_desc="
|
|||
|
||||
This package provides development files: headers, static libraries, etc."
|
||||
|
||||
Add_dependency run libcap-devel
|
||||
Add_dependency run popt-devel
|
||||
Add_dependency run mit-krb5-devel
|
||||
Add_dependency run e2fsprogs-devel
|
||||
Add_dependency run libldap-devel
|
||||
Add_dependency run zlib-devel
|
||||
Add_dependency run pam-devel
|
||||
Add_dependency run acl-devel
|
||||
Add_dependency run attr-devel
|
||||
Add_dependency run avahi-libs-devel
|
||||
Add_dependency run readline-devel
|
||||
Add_dependency run tdb-devel
|
||||
Add_dependency run libsmbclient
|
||||
|
||||
revision=2
|
||||
|
||||
do_install()
|
||||
{
|
||||
mkdir -p ${DESTDIR}/usr/lib
|
||||
mv ${SRCPKGDESTDIR}/usr/include ${DESTDIR}/usr
|
||||
do_install() {
|
||||
vmove usr/include usr
|
||||
}
|
||||
|
|
|
@ -18,3 +18,4 @@ libacl.so.1
|
|||
libattr.so.1
|
||||
libavahi-client.so.3
|
||||
libavahi-common.so.3
|
||||
librt.so.1
|
||||
|
|
|
@ -14,3 +14,5 @@ libcom_err.so.2
|
|||
libgssapi_krb5.so.2
|
||||
libz.so.1
|
||||
libreadline.so.6
|
||||
librt.so.1
|
||||
libuuid.so.1
|
||||
|
|
|
@ -6,12 +6,7 @@ long_desc="
|
|||
Windows and Samba servers, including smbclient, smbtar, and smbspool.
|
||||
Utilities for mounting shares locally are found in the package cifs-utils."
|
||||
|
||||
|
||||
revision=2
|
||||
|
||||
do_install()
|
||||
{
|
||||
install -d ${DESTDIR}/usr/share/man
|
||||
mv ${SRCPKGDESTDIR}/usr/bin ${DESTDIR}/usr
|
||||
mv ${SRCPKGDESTDIR}/usr/share/man/man1 ${DESTDIR}/usr/share/man
|
||||
do_install() {
|
||||
vmove usr/bin usr
|
||||
vmove usr/share/man/man1 usr/share/man
|
||||
}
|
||||
|
|
|
@ -1,18 +1,20 @@
|
|||
# Template file for 'samba'
|
||||
pkgname=samba
|
||||
version=3.5.6
|
||||
revision=2
|
||||
version=3.6.2
|
||||
build_wrksrc=source3
|
||||
distfiles="http://us1.samba.org/samba/ftp/stable/$pkgname-$version.tar.gz"
|
||||
build_style=gnu-configure
|
||||
configure_args="--with-fhs --with-pthreads
|
||||
--with-configdir=/etc/samba --with-lockdir=/var/lock/samba
|
||||
--with-piddir=/var/run/samba --with-pammodulesdir=/lib/security
|
||||
--with-syslog --enable-external-libtalloc --with-cifsumount
|
||||
--enable-external-libtdb --disable-fam"
|
||||
configure_args="--with-fhs --with-pam --with-pam_smbpass --with-ldap
|
||||
--with-configdir=/etc/samba --with-lockdir=/var/samba
|
||||
--with-cachedir=/var/samba --with-nmbdsocketdir=/run/samba/socket
|
||||
--with-statedir=/var/samba --with-piddir=/run/samba --with-dnsupdate
|
||||
--with-pammodulesdir=/lib/security --with-automount --disable-swat
|
||||
--with-syslog --enable-external-libtalloc --with-quotas --disable-cups
|
||||
--enable-external-libtdb --disable-fam --with-ads --with-acl-support
|
||||
--with-shared-modules=idmap_ad,idmap_adex,idmap_rid,idmap_hash,idmap_tdb2"
|
||||
short_desc="SMB/CIFS file, print, and login server for Unix"
|
||||
maintainer="Juan RP <xtraeme@gmail.com>"
|
||||
checksum=466410868375d19a286ac3fc5d9f3c267ce359189f8e0d76e72ec10bd54247da
|
||||
checksum=f6ce5f39b23540b82a00b1fcf6735bcef65cc1cf3639679c9e2e0cb850a3014f
|
||||
long_desc="
|
||||
Samba is an implementation of the SMB/CIFS protocol for Unix systems,
|
||||
providing support for cross-platform file and printer sharing with Microsoft
|
||||
|
@ -20,34 +22,74 @@ long_desc="
|
|||
NT4-style domain controller, and can integrate with both NT4 domains and
|
||||
Active Directory realms as a member server."
|
||||
|
||||
# XXX: Prepare rc service, conf files, etc.
|
||||
subpackages="cifs-utils smbclient libsmbclient samba-devel"
|
||||
# Require a newer libsmclient.
|
||||
shlib_depends="libsmbclient>=${version}"
|
||||
subpackages="smbclient libsmbclient samba-devel"
|
||||
|
||||
# Don't restart services automatically.
|
||||
systemd_services="
|
||||
nmbd.service off
|
||||
smbd.service off
|
||||
winbindd.service off"
|
||||
|
||||
conf_files="/etc/samba/smb.conf /etc/pam.d/samba"
|
||||
|
||||
Add_dependency run readline
|
||||
Add_dependency run smbclient
|
||||
|
||||
Add_dependency build perl
|
||||
Add_dependency build python-devel
|
||||
Add_dependency build gettext
|
||||
Add_dependency build libcap-devel
|
||||
Add_dependency build popt-devel
|
||||
Add_dependency build mit-krb5-devel
|
||||
Add_dependency build e2fsprogs-devel
|
||||
Add_dependency build mit-krb5-devel
|
||||
Add_dependency build libldap-devel
|
||||
Add_dependency build zlib-devel
|
||||
Add_dependency build pam-devel
|
||||
Add_dependency build acl-devel
|
||||
Add_dependency build attr-devel
|
||||
Add_dependency build avahi-libs-devel
|
||||
Add_dependency build readline-devel
|
||||
Add_dependency build tdb-devel
|
||||
Add_dependency build talloc-devel
|
||||
|
||||
post_install()
|
||||
{
|
||||
# Remove tdb manpages!
|
||||
rm -f ${DESTDIR}/usr/share/man/man8/tdb*
|
||||
post_install() {
|
||||
# conf file
|
||||
cat examples/smb.conf.default | \
|
||||
sed 's|log file = .*$|log file = /var/log/samba/%m.log|g' > \
|
||||
${DESTDIR}/etc/samba/smb.conf
|
||||
|
||||
# Remove swat (outdated, unsecure).
|
||||
rm -f ${DESTDIR}/usr/sbin/swat
|
||||
rm -f ${DESTDIR}/usr/share/man/man8/swat
|
||||
rm -rf ${DESTDIR}/usr/share/samba/swat
|
||||
# fix logrotate
|
||||
sed -i -e 's|log.%m|%m.log|g' ${DESTDIR}/etc/samba/smb.conf
|
||||
|
||||
# fix spool directory
|
||||
sed -i 's|/usr/spool/samba|/var/spool/samba|g' \
|
||||
${DESTDIR}/etc/samba/smb.conf
|
||||
|
||||
# nsswitch libraries
|
||||
vinstall nsswitch/libnss_wins.so 755 lib
|
||||
ln -s libnss_wins.so ${DESTDIR}/lib/libnss_wins.so.2
|
||||
|
||||
vinstall nsswitch/libnss_winbind.so 755 lib
|
||||
ln -s libnss_winbind.so ${DESTDIR}/lib/libnss_winbind.so.2
|
||||
|
||||
# winbind krb5 locator
|
||||
vinstall source3/bin/winbind_krb5_locator.so 755 \
|
||||
usr/lib/krb5/plugins/libkrb5
|
||||
|
||||
# Remove unused manpages
|
||||
rm -f ${DESTDIR}/usr/share/man/man8/tdb*
|
||||
rm -f ${DESTDIR}/usr/share/man/man8/swat*
|
||||
|
||||
# systemd units
|
||||
for f in nmbd smbd winbindd; do
|
||||
vinstall ${FILESDIR}/${f}.service 644 lib/systemd/system
|
||||
done
|
||||
# systemd tmpfiles
|
||||
vinstall ${FILESDIR}/samba.tmpfiles 644 usr/lib/tmpfiles.d samba.conf
|
||||
|
||||
# PAM support
|
||||
vinstall ${FILESDIR}/samba.pam 644 etc/pam.d samba
|
||||
|
||||
# logrotate file
|
||||
vinstall ${FILESDIR}/samba.logrotate 644 etc/logrotate.d samba
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue