From dadc75c350bd5695c23fd7c1e87159b41b2317ee Mon Sep 17 00:00:00 2001 From: Juan RP Date: Wed, 9 Oct 2013 09:24:06 +0200 Subject: [PATCH] samba: update to 3.6.19. --- srcpkgs/samba/files/nmbd.service | 6 +++++- srcpkgs/samba/files/smbd.service | 7 +++++-- srcpkgs/samba/files/smbd.socket | 9 +++++++++ srcpkgs/samba/files/smbd@.service | 7 +++++++ srcpkgs/samba/files/winbindd.service | 7 +++++-- srcpkgs/samba/template | 19 +++++++------------ 6 files changed, 38 insertions(+), 17 deletions(-) create mode 100644 srcpkgs/samba/files/smbd.socket create mode 100644 srcpkgs/samba/files/smbd@.service diff --git a/srcpkgs/samba/files/nmbd.service b/srcpkgs/samba/files/nmbd.service index 6e22ef2fb65..1072b735053 100644 --- a/srcpkgs/samba/files/nmbd.service +++ b/srcpkgs/samba/files/nmbd.service @@ -1,8 +1,12 @@ [Unit] Description=Samba NetBIOS name server +After=network.target [Service] -ExecStart=/usr/sbin/nmbd -F +Type=forking +PIDFile=/run/nmbd.pid +ExecStart=/usr/sbin/nmbd -D +ExecReload=/usr/bin/kill -HUP $MAINPID [Install] WantedBy=multi-user.target diff --git a/srcpkgs/samba/files/smbd.service b/srcpkgs/samba/files/smbd.service index beb9bfad7f3..a4cf8df702c 100644 --- a/srcpkgs/samba/files/smbd.service +++ b/srcpkgs/samba/files/smbd.service @@ -1,9 +1,12 @@ [Unit] Description=Samba SMB/CIFS server +After=network.target nmbd.service winbindd.service [Service] -ExecStart=/usr/sbin/smbd -F -ExecReload=/bin/kill -HUP $MAINPID +Type=forking +PIDFile=/run/smbd.pid +ExecStart=/usr/sbin/smbd -D +ExecReload=/usr/bin/kill -HUP $MAINPID [Install] WantedBy=multi-user.target diff --git a/srcpkgs/samba/files/smbd.socket b/srcpkgs/samba/files/smbd.socket new file mode 100644 index 00000000000..833bf438832 --- /dev/null +++ b/srcpkgs/samba/files/smbd.socket @@ -0,0 +1,9 @@ +[Unit] +Description=Samba SMB/CIFS server socket + +[Socket] +ListenStream=445 +Accept=yes + +[Install] +WantedBy=sockets.target diff --git a/srcpkgs/samba/files/smbd@.service b/srcpkgs/samba/files/smbd@.service new file mode 100644 index 00000000000..38761bcf8ad --- /dev/null +++ b/srcpkgs/samba/files/smbd@.service @@ -0,0 +1,7 @@ +[Unit] +Description=Samba SMB/CIFS server instance + +[Service] +ExecStart=/usr/sbin/smbd -F +ExecReload=/usr/bin/kill -HUP $MAINPID +StandardInput=socket diff --git a/srcpkgs/samba/files/winbindd.service b/srcpkgs/samba/files/winbindd.service index 509c8962813..a704bb25895 100644 --- a/srcpkgs/samba/files/winbindd.service +++ b/srcpkgs/samba/files/winbindd.service @@ -1,9 +1,12 @@ [Unit] Description=Samba Winbind daemon +After=network.target nmbd.service [Service] -ExecStart=/usr/sbin/winbindd -F -ExecReload=/bin/kill -HUP $MAINPID +Type=forking +PIDFile=/run/winbindd.pid +ExecStart=/usr/sbin/winbindd -D +ExecReload=/usr/bin/kill -HUP $MAINPID [Install] WantedBy=multi-user.target diff --git a/srcpkgs/samba/template b/srcpkgs/samba/template index 30021b8a23a..25741082d22 100644 --- a/srcpkgs/samba/template +++ b/srcpkgs/samba/template @@ -1,11 +1,11 @@ # Template file for 'samba' pkgname=samba -version=3.6.18 +version=3.6.19 revision=1 build_wrksrc=source3 build_style=gnu-configure configure_args="--with-fhs --with-pam --with-pam_smbpass --with-ldap - --with-configdir=/etc/samba --with-lockdir=/var/samba + --with-configdir=/etc/samba --with-lockdir=/var/samba --with-static-libs=libtevent --with-cachedir=/var/samba --with-nmbdsocketdir=/run/samba/socket --with-statedir=/var/samba --with-piddir=/run/samba --with-dnsupdate --with-pammodulesdir=/usr/lib/security --with-automount --disable-swat @@ -17,7 +17,7 @@ maintainer="Juan RP " license="GPL-3" homepage="http://www.samba.org" distfiles="http://us1.samba.org/samba/ftp/stable/$pkgname-$version.tar.gz" -checksum=6d71a9ba77567eae863b9599e451479b99f6acb6042a1d98e7a22422ce599992 +checksum=addecc6acb05d3ffd0934f7f91d8e83852705b9e858e13c506e51c297259a92e hostmakedepends="pkg-config perl python-devel" makedepends="readline-devel libcap-devel popt-devel e2fsprogs-devel @@ -65,10 +65,12 @@ post_install() { # Remove unused manpages rm -f ${DESTDIR}/usr/share/man/man8/tdb* rm -f ${DESTDIR}/usr/share/man/man8/swat* + rm -f ${DESTDIR}/usr/lib/libtevent* + rm -f ${DESTDIR}/usr/include/samba/tevent* # systemd units - for f in nmbd smbd winbindd; do - vinstall ${FILESDIR}/${f}.service 644 usr/lib/systemd/system + for f in ${FILESDIR}/*.{service,socket}; do + vinstall ${f} 644 usr/lib/systemd/system done # systemd tmpfiles vinstall ${FILESDIR}/samba.tmpfiles 644 usr/lib/tmpfiles.d samba.conf @@ -93,7 +95,6 @@ libsmbclient_package() { short_desc="Shared libraries for communication with SMB/CIFS servers" depends="mit-krb5-libs>=1.10.1" pkg_install() { - vmove "usr/lib/libtevent.so.*" vmove "usr/lib/libwbclient.so.*" vmove "usr/lib/libsmbclient.so.*" vmove usr/share/man/man7/libsmbclient.7 @@ -108,17 +109,11 @@ samba-devel_package() { vmove usr/lib/pkgconfig vmove usr/lib/libwbclient.so vmove usr/lib/libsmbclient.so - vmove usr/lib/libtevent.so } } samba_package() { conf_files="/etc/samba/smb.conf /etc/pam.d/samba" - # Don't restart services automatically. - systemd_services=" - nmbd.service off - smbd.service off - winbindd.service off" pkg_install() { vmove all }