wok-next rev 20273

remove samba-pam
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Nov 08 10:06:19 2017 +0100 (2017-11-08)
parents 886f88dc3863
children 7da742e76e90
files samba-pam/receipt samba-pam/stuff/applications/swat.desktop samba-pam/stuff/etc/init.d/samba samba-pam/stuff/etc/samba/smb.conf samba-pam/stuff/swat.png samba/receipt
line diff
     1.1 --- a/samba-pam/receipt	Wed Nov 08 09:48:17 2017 +0100
     1.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.3 @@ -1,103 +0,0 @@
     1.4 -# SliTaz package receipt v2.
     1.5 -
     1.6 -PACKAGE="samba-pam"
     1.7 -VERSION="4.6.7"
     1.8 -CATEGORY="system-tools"
     1.9 -SHORT_DESC="File and print services with SMB/CIFS using PAM"
    1.10 -MAINTAINER="pascal.bellard@slitaz.org"
    1.11 -LICENSE="GPL3"
    1.12 -WEB_SITE="https://www.samba.org/"
    1.13 -BUGS="Open directory needs MIT kerberos support (krb5)"
    1.14 -COOKOPTS="!menus"
    1.15 -
    1.16 -SOURCE="samba"
    1.17 -TARBALL="$SOURCE-$VERSION.tar.gz"
    1.18 -WGET_URL="https://download.samba.org/pub/samba/stable/$TARBALL"
    1.19 -
    1.20 -BUILD_DEPENDS="python-dev perl acl-dev docbook-xsl openldap-dev   \
    1.21 -gnutls-dev krb5-dev cyrus-sasl-dev zlib-dev popt-dev libtdb-dev talloc-dev \
    1.22 -libgcrypt-dev nss-dev cups-dev dbus-dev pam pam-dev"
    1.23 -
    1.24 -version() {
    1.25 -	wget -O- -q https://download.samba.org/pub/samba/ | \
    1.26 -	sed '/LATEST-IS-SAMBA/!d; s|.*SAMBA-\([^<]*\).*|\1|'
    1.27 -}
    1.28 -
    1.29 -# Rules to configure and make the package.
    1.30 -compile_rules()
    1.31 -{
    1.32 -	# http://www.linuxfromscratch.org/blfs/view/stable/basicnet/samba.html
    1.33 -
    1.34 -	./configure \
    1.35 -		--prefix=/usr \
    1.36 -		--sysconfdir=/etc \
    1.37 -		--localstatedir=/var \
    1.38 -		--with-piddir=/run/samba \
    1.39 -		--with-pammodulesdir=/lib/security \
    1.40 -		--with-pam \
    1.41 -		--enable-fhs \
    1.42 -		--without-ad-dc \
    1.43 -		--without-systemd \
    1.44 -		--enable-selftest \
    1.45 -		$CONFIGURE_ARGS &&
    1.46 -	make && make install || return 1
    1.47 -
    1.48 -	mkdir -p $install/lib
    1.49 -	mv $install/usr/lib/libnss_wins.so* $install/usr/lib/libnss_winbind.so* \
    1.50 -		$install/lib
    1.51 -	ln -sf ../../lib/libnss_winbind.so.2 $install/usr/lib/libnss_winbind.so
    1.52 -	ln -sf ../../lib/libnss_wins.so.2    $install/usr/lib/libnss_wins.so
    1.53 -
    1.54 -	install -m644 examples/smb.conf.default $install/etc/samba
    1.55 -
    1.56 -	mkdir -pv $install/etc/openldap/schema
    1.57 -	cp examples/LDAP/README $install/etc/openldap/schema/README.LDAP
    1.58 -	cp examples/LDAP/samba* $install/etc/openldap/schema
    1.59 -	cp -r examples/LDAP/get* examples/LDAP/ol* $install/etc/openldap/schema
    1.60 -
    1.61 -	cp -a $stuff/etc $install
    1.62 -
    1.63 -	# Symlink smbspool to cups backend
    1.64 -	mkdir -p $install/usr/lib/cups/backend
    1.65 -	ln -sf /usr/bin/smbspool $install/usr/lib/cups/backend/smb
    1.66 -
    1.67 -	# for swat package
    1.68 -#	icodir="$install/usr/share/icons/hicolor/48x48/apps"
    1.69 -#	mkdir -p $icodir
    1.70 -#	cp $stuff/swat.png $icodir
    1.71 -
    1.72 -	chown -R root:root $install
    1.73 -}
    1.74 -
    1.75 -# Rules to gen a SliTaz package suitable for Tazpkg.
    1.76 -genpkg_rules()
    1.77 -{
    1.78 -	case $PACKAGE in
    1.79 -		samba-pam)
    1.80 -			copy @std
    1.81 -#			remove_already_packed
    1.82 -			PROVIDE="samba:pam"
    1.83 -			DEPENDS="acl attr dbus libcups libgnutls libldap libtdb ncurses \
    1.84 -			ncurses-libform ncurses-libpanel perl popt python talloc \
    1.85 -			talloc-python zlib pam"
    1.86 -			PROVIDE="samba-common smbclient"
    1.87 -			TAZPANEL_DAEMON="man::samba|edit::/etc/samba/smb.conf|web::$WEB_SITE"
    1.88 -			CONFIG_FILES="/etc/samba/smb.conf"
    1.89 -			;;
    1.90 -	esac
    1.91 -}
    1.92 -
    1.93 -# Pre and post install commands for Tazpkg.
    1.94 -post_install_samba_pam() {
    1.95 -	[ -n "$quiet" ] || cat <<EOT
    1.96 -
    1.97 -	.----------------------------------------------------.
    1.98 -	| The main configuration file is /etc/samba/smb.conf |
    1.99 -	|----------------------------------------------------|
   1.100 -	| To start samba server you can run:                 |
   1.101 -	|     /etc/init.d/samba start                        |
   1.102 -	|                                                    |
   1.103 -	| Or add samba to RUN_DAEMONS in /etc/rcS.conf       |
   1.104 -	'----------------------------------------------------'
   1.105 -EOT
   1.106 -}
     2.1 --- a/samba-pam/stuff/applications/swat.desktop	Wed Nov 08 09:48:17 2017 +0100
     2.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.3 @@ -1,7 +0,0 @@
     2.4 -[Desktop Entry]
     2.5 -Name=SAMBA Administration
     2.6 -Name[pt_BR]=AdministraĆ§Ć£o do Samba
     2.7 -Icon=swat
     2.8 -Exec=browser http://127.0.0.1/swat/
     2.9 -Type=Application
    2.10 -Categories=System;
     3.1 --- a/samba-pam/stuff/etc/init.d/samba	Wed Nov 08 09:48:17 2017 +0100
     3.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.3 @@ -1,73 +0,0 @@
     3.4 -#!/bin/sh
     3.5 -# /etc/init.d/samba : Start, stop and restart Samba server on SliTaz, at
     3.6 -# boot time or with the command line.
     3.7 -#
     3.8 -# To start Samba server at boot time, just put samba in the $RUN_DAEMONS
     3.9 -# variable of /etc/rcS.conf and configure options with /etc/daemons.conf
    3.10 -#
    3.11 -. /etc/init.d/rc.functions
    3.12 -. /etc/daemons.conf
    3.13 -
    3.14 -NAME=Samba
    3.15 -DESC="$(_ '%s server' Samba)"
    3.16 -SMBD=/usr/sbin/smbd
    3.17 -NMBD=/usr/sbin/nmbd
    3.18 -NMBPIDFILE=/var/run/samba/nmbd.pid
    3.19 -SMBPIDFILE=/var/run/samba/smbd.pid
    3.20 -
    3.21 -[ -d /var/run/samba ] || mkdir -p /var/run/samba
    3.22 -
    3.23 -case "$1" in
    3.24 -  start)
    3.25 -    if active_pidfile $SMBPIDFILE smbd ; then
    3.26 -      _ '%s is already running.' "$NAME ($SMBD)"
    3.27 -    else
    3.28 -      action 'Starting %s: %s...' "$DESC" $SMBD
    3.29 -      $SMBD -D
    3.30 -      status
    3.31 -    fi
    3.32 -    if active_pidfile $NMBPIDFILE nmbd ; then
    3.33 -      _ '%s is already running.' "$NAME ($NMBD)"
    3.34 -    else
    3.35 -      action 'Starting %s: %s...' "$DESC" $NMBD
    3.36 -      $NMBD -D
    3.37 -      status
    3.38 -    fi
    3.39 -    ;;
    3.40 -  stop)
    3.41 -    if ! active_pidfile $SMBPIDFILE smbd ; then
    3.42 -      _ '%s is not running.' "$NAME ($SMBD)"
    3.43 -    else
    3.44 -      action 'Stopping %s: %s...' "$DESC" $SMBD
    3.45 -      kill $(cat $SMBPIDFILE)
    3.46 -      status
    3.47 -    fi
    3.48 -    if ! active_pidfile $NMBPIDFILE nmbd ; then
    3.49 -      _ '%s is not running.' "$NAME ($NMBD)"
    3.50 -    else
    3.51 -      action 'Stopping %s: %s...' "$DESC" $NMBD
    3.52 -      kill $(cat $NMBPIDFILE)
    3.53 -      status
    3.54 -    fi
    3.55 -    ;;
    3.56 -  restart)
    3.57 -    $0 stop
    3.58 -    $0 start
    3.59 -    ;;
    3.60 -  reload)
    3.61 -    if ! active_pidfile $SMBPIDFILE smbd ; then
    3.62 -      _ '%s is not running.' $NAME
    3.63 -      exit 1
    3.64 -    fi
    3.65 -    action 'Reloading %s: %s...' "$DESC" $SMBD
    3.66 -    kill -HUP $(cat $SMBPIDFILE)
    3.67 -    status
    3.68 -    ;;
    3.69 -  *)
    3.70 -    emsg "<n><b>$(_ 'Usage:')</b> $0 [start|stop|restart!reload]"
    3.71 -    newline
    3.72 -    exit 1
    3.73 -    ;;
    3.74 -esac
    3.75 -
    3.76 -exit 0
     4.1 --- a/samba-pam/stuff/etc/samba/smb.conf	Wed Nov 08 09:48:17 2017 +0100
     4.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.3 @@ -1,10 +0,0 @@
     4.4 -[global]
     4.5 -workgroup = SLITAZ
     4.6 -security = SHARE
     4.7 -
     4.8 -[homes]
     4.9 -comment = Home Directories
    4.10 -valid users = %S
    4.11 -read only = No
    4.12 -browseable = No
    4.13 -
     5.1 Binary file samba-pam/stuff/swat.png has changed
     6.1 --- a/samba/receipt	Wed Nov 08 09:48:17 2017 +0100
     6.2 +++ b/samba/receipt	Wed Nov 08 10:06:19 2017 +0100
     6.3 @@ -15,8 +15,8 @@
     6.4  
     6.5  BUILD_DEPENDS="python-dev perl acl-dev docbook-xsl openldap-dev   \
     6.6  gnutls-dev krb5-dev cyrus-sasl-dev zlib-dev popt-dev libtdb-dev talloc-dev \
     6.7 -libgcrypt-dev nss-dev cups-dev dbus-dev"
     6.8 -SPLIT="samba-dev" # TODO: swat
     6.9 +libgcrypt-dev nss-dev cups-dev dbus-dev pam pam-dev"
    6.10 +SPLIT="samba samba-pam samba-dev" # TODO: swat
    6.11  
    6.12  version() {
    6.13  	wget -O- -q https://download.samba.org/pub/samba/ | \
    6.14 @@ -28,6 +28,7 @@
    6.15  {
    6.16  	# http://www.linuxfromscratch.org/blfs/view/stable/basicnet/samba.html
    6.17  
    6.18 +	cp -a $src $src-pam
    6.19  	./configure \
    6.20  		--prefix=/usr \
    6.21  		--sysconfdir=/etc \
    6.22 @@ -35,37 +36,55 @@
    6.23  		--with-piddir=/run/samba \
    6.24  		--with-pammodulesdir=/lib/security \
    6.25  		--enable-fhs \
    6.26 +		--without-pam \
    6.27  		--without-ad-dc \
    6.28  		--without-systemd \
    6.29  		--enable-selftest \
    6.30  		$CONFIGURE_ARGS &&
    6.31  	make && make install || return 1
    6.32  
    6.33 -	mkdir -p $install/lib
    6.34 -	mv $install/usr/lib/libnss_wins.so* $install/usr/lib/libnss_winbind.so* \
    6.35 -		$install/lib
    6.36 -	ln -sf ../../lib/libnss_winbind.so.2 $install/usr/lib/libnss_winbind.so
    6.37 -	ln -sf ../../lib/libnss_wins.so.2    $install/usr/lib/libnss_wins.so
    6.38 +	cd $src-pam
    6.39 +	./configure \
    6.40 +		--prefix=/usr \
    6.41 +		--sysconfdir=/etc \
    6.42 +		--localstatedir=/var \
    6.43 +		--with-piddir=/run/samba \
    6.44 +		--with-pammodulesdir=/lib/security \
    6.45 +		--enable-fhs \
    6.46 +		--with-pam \
    6.47 +		--without-ad-dc \
    6.48 +		--without-systemd \
    6.49 +		--enable-selftest \
    6.50 +		$CONFIGURE_ARGS &&
    6.51 +	make && make DESTDIR=install-pam || return 1
    6.52  
    6.53 -	install -m644 examples/smb.conf.default $install/etc/samba
    6.54 +	for inst in $install $install-pam ; do
    6.55 +		mkdir -p $inst/lib
    6.56 +		mv $inst/usr/lib/libnss_wins.so* $inst/usr/lib/libnss_winbind.so* \
    6.57 +			$inst/lib
    6.58 +		ln -sf ../../lib/libnss_winbind.so.2 $inst/usr/lib/libnss_winbind.so
    6.59 +		ln -sf ../../lib/libnss_wins.so.2    $inst/usr/lib/libnss_wins.so
    6.60  
    6.61 -	mkdir -pv $install/etc/openldap/schema
    6.62 -	cp examples/LDAP/README $install/etc/openldap/schema/README.LDAP
    6.63 -	cp examples/LDAP/samba* $install/etc/openldap/schema
    6.64 -	cp -r examples/LDAP/get* examples/LDAP/ol* $install/etc/openldap/schema
    6.65 +		install -m644 examples/smb.conf.default $inst/etc/samba
    6.66  
    6.67 -	cp -a $stuff/etc $install
    6.68 +		mkdir -pv $inst/etc/openldap/schema
    6.69 +		cp examples/LDAP/README $inst/etc/openldap/schema/README.LDAP
    6.70 +		cp examples/LDAP/samba* $inst/etc/openldap/schema
    6.71 +		cp -r examples/LDAP/get* examples/LDAP/ol* $inst/etc/openldap/schema
    6.72  
    6.73 -	# Symlink smbspool to cups backend
    6.74 -	mkdir -p $install/usr/lib/cups/backend
    6.75 -	ln -sf /usr/bin/smbspool $install/usr/lib/cups/backend/smb
    6.76 +		cp -a $stuff/etc $inst
    6.77  
    6.78 -	# for swat package
    6.79 -#	icodir="$install/usr/share/icons/hicolor/48x48/apps"
    6.80 -#	mkdir -p $icodir
    6.81 -#	cp $stuff/swat.png $icodir
    6.82 +		# Symlink smbspool to cups backend
    6.83 +		mkdir -p $inst/usr/lib/cups/backend
    6.84 +		ln -sf /usr/bin/smbspool $inst/usr/lib/cups/backend/smb
    6.85  
    6.86 -	chown -R root:root $install
    6.87 +		# for swat package
    6.88 +#		icodir="$inst/usr/share/icons/hicolor/48x48/apps"
    6.89 +#		mkdir -p $icodir
    6.90 +#		cp $stuff/swat.png $icodir
    6.91 +
    6.92 +		chown -R root:root $inst
    6.93 +	done
    6.94  }
    6.95  
    6.96  # Rules to gen a SliTaz package suitable for Tazpkg.
    6.97 @@ -95,6 +114,16 @@
    6.98  			TAZPANEL_DAEMON="man|edit::/etc/samba/smb.conf|web::$WEB_SITE"
    6.99  			CONFIG_FILES="/etc/samba/smb.conf"
   6.100  			;;
   6.101 +		samba-dev)
   6.102 +			copy @std
   6.103 +#			remove by hand already packed files...
   6.104 +			DEPENDS="acl attr dbus libcups libgnutls libldap libtdb ncurses \
   6.105 +			ncurses-libform ncurses-libpanel perl popt python talloc \
   6.106 +			talloc-python zlib pam"
   6.107 +			PROVIDE="samba:pam samba-common smbclient"
   6.108 +			TAZPANEL_DAEMON="man::samba|edit::/etc/samba/smb.conf|web::$WEB_SITE"
   6.109 +			CONFIG_FILES="/etc/samba/smb.conf"
   6.110 +			;;
   6.111  		*-dev)
   6.112  			copy @dev
   6.113  			DEPENDS="samba talloc-dev"