wok-next rev 20268

Up samba-pam (4.6.7)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Nov 08 08:21:56 2017 +0100 (2017-11-08)
parents b5e2e7bb2247
children ec55d50b1067
files phproxy/receipt 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
line diff
     1.1 --- a/phproxy/receipt	Wed Nov 08 03:51:41 2017 +0200
     1.2 +++ b/phproxy/receipt	Wed Nov 08 08:21:56 2017 +0100
     1.3 @@ -13,11 +13,13 @@
     1.4  #HOST_ARCH="any"
     1.5  
     1.6  DEPENDS="php"
     1.7 -BUILD_DEPENDS=""
     1.8 +BUILD_DEPENDS="p7zip"
     1.9  
    1.10  # Rules to configure and make the package.
    1.11  compile_rules()
    1.12  {
    1.13 +	7zr x $TARBALL
    1.14 +	cd $SOURCE\ *
    1.15  	dos2unix *
    1.16  	mkdir -p $DESTDIR/usr/share/$PACKAGE
    1.17  	cp *.php *.css $DESTDIR/usr/share/$PACKAGE
     2.1 --- a/samba-pam/receipt	Wed Nov 08 03:51:41 2017 +0200
     2.2 +++ b/samba-pam/receipt	Wed Nov 08 08:21:56 2017 +0100
     2.3 @@ -1,71 +1,103 @@
     2.4 -# SliTaz package receipt.
     2.5 +# SliTaz package receipt v2.
     2.6  
     2.7  PACKAGE="samba-pam"
     2.8 -VERSION="3.6.7"
     2.9 +VERSION="4.6.7"
    2.10  CATEGORY="system-tools"
    2.11 -SHORT_DESC="File and print services with SMB/CIFS using PAM."
    2.12 +SHORT_DESC="File and print services with SMB/CIFS using PAM"
    2.13  MAINTAINER="pascal.bellard@slitaz.org"
    2.14  LICENSE="GPL3"
    2.15 +WEB_SITE="https://www.samba.org/"
    2.16 +BUGS="Open directory needs MIT kerberos support (krb5)"
    2.17 +COOKOPTS="!menus"
    2.18 +
    2.19  SOURCE="samba"
    2.20  TARBALL="$SOURCE-$VERSION.tar.gz"
    2.21 -WEB_SITE="http://samba.org/"
    2.22 -WGET_URL="${WEB_SITE}$SOURCE/ftp/stable/$TARBALL"
    2.23 -TAZPANEL_DAEMON="man::samba|edit::/etc/samba/smb.conf|web::$WEB_SITE"
    2.24 -SUGGESTED="gamin"
    2.25 -CONFIG_FILES="/etc/samba"
    2.26 -PROVIDE="samba:pam"
    2.27 -BUGS="Open directory needs MIT kerberos support (krb5)"
    2.28 +WGET_URL="https://download.samba.org/pub/samba/stable/$TARBALL"
    2.29  
    2.30 -BUILD_DEPENDS="libldap openldap openldap-dev cups cups-dev pam pam-dev krb5"
    2.31 -DEPENDS="libldap samba-common glibc-base ncurses popt zlib cifs-utils acl pam \
    2.32 -perl cups krb5"
    2.33 +BUILD_DEPENDS="python-dev perl acl-dev docbook-xsl openldap-dev   \
    2.34 +gnutls-dev krb5-dev cyrus-sasl-dev zlib-dev popt-dev libtdb-dev talloc-dev \
    2.35 +libgcrypt-dev nss-dev cups-dev dbus-dev pam pam-dev"
    2.36 +
    2.37 +version() {
    2.38 +	wget -O- -q https://download.samba.org/pub/samba/ | \
    2.39 +	sed '/LATEST-IS-SAMBA/!d; s|.*SAMBA-\([^<]*\).*|\1|'
    2.40 +}
    2.41  
    2.42  # Rules to configure and make the package.
    2.43  compile_rules()
    2.44  {
    2.45 -	cd $src/source3
    2.46 -	./configure --prefix=/usr --infodir=/usr/share/info \
    2.47 -	--with-piddir=/var/run/samba --with-lockdir=/var/run/samba \
    2.48 -	--with-winbind --with-ldap --with-fhs --enable-cups --enable-swat \
    2.49 -	--enable-shared-libs --with-libtalloc --with-libtdb \
    2.50 -	--with-libsmbsharemodes --with-libsmbclient \
    2.51 -	--with-pam --with-pammodulesdir=/lib/security \
    2.52 -	--sysconfdir=/etc --localstatedir=/var \
    2.53 -	--mandir=/usr/share/man $CONFIGURE_ARGS &&
    2.54 -	make $MAKEFLAGS &&
    2.55 -	make DESTDIR=$DESTDIR install || return 1
    2.56 -	#rm -f $DESTDIR/usr/*bin/*.old
    2.57 -	#ln -s libwbclient.so $DESTDIR/usr/lib/libwbclient.so.0
    2.58 +	# http://www.linuxfromscratch.org/blfs/view/stable/basicnet/samba.html
    2.59 +
    2.60 +	./configure \
    2.61 +		--prefix=/usr \
    2.62 +		--sysconfdir=/etc \
    2.63 +		--localstatedir=/var \
    2.64 +		--with-piddir=/run/samba \
    2.65 +		--with-pammodulesdir=/lib/security \
    2.66 +		--with-pam \
    2.67 +		--enable-fhs \
    2.68 +		--without-ad-dc \
    2.69 +		--without-systemd \
    2.70 +		--enable-selftest \
    2.71 +		$CONFIGURE_ARGS &&
    2.72 +	make && make install || return 1
    2.73 +
    2.74 +	mkdir -p $install/lib
    2.75 +	mv $install/usr/lib/libnss_wins.so* $install/usr/lib/libnss_winbind.so* \
    2.76 +		$install/lib
    2.77 +	ln -sf ../../lib/libnss_winbind.so.2 $install/usr/lib/libnss_winbind.so
    2.78 +	ln -sf ../../lib/libnss_wins.so.2    $install/usr/lib/libnss_wins.so
    2.79 +
    2.80 +	install -m644 examples/smb.conf.default $install/etc/samba
    2.81 +
    2.82 +	mkdir -pv $install/etc/openldap/schema
    2.83 +	cp examples/LDAP/README $install/etc/openldap/schema/README.LDAP
    2.84 +	cp examples/LDAP/samba* $install/etc/openldap/schema
    2.85 +	cp -r examples/LDAP/get* examples/LDAP/ol* $install/etc/openldap/schema
    2.86 +
    2.87 +	cp -a $stuff/etc $install
    2.88 +
    2.89 +	# Symlink smbspool to cups backend
    2.90 +	mkdir -p $install/usr/lib/cups/backend
    2.91 +	ln -sf /usr/bin/smbspool $install/usr/lib/cups/backend/smb
    2.92 +
    2.93 +	# for swat package
    2.94 +#	icodir="$install/usr/share/icons/hicolor/48x48/apps"
    2.95 +#	mkdir -p $icodir
    2.96 +#	cp $stuff/swat.png $icodir
    2.97 +
    2.98 +	chown -R root:root $install
    2.99  }
   2.100  
   2.101  # Rules to gen a SliTaz package suitable for Tazpkg.
   2.102  genpkg_rules()
   2.103  {
   2.104 -	mkdir -p $fs/usr
   2.105 -	cp -a $install/etc $fs
   2.106 -	cp -a $install/var $fs
   2.107 -	cp -a $install/lib $fs
   2.108 -	cp -a $install/usr/lib $fs/usr
   2.109 -	cp -a $install/usr/sbin $fs/usr
   2.110 -	cp -a $install/usr/bin $fs/usr
   2.111 -	cp -a $WOK/$SOURCE/stuff/etc $fs
   2.112 -	cat $WOK/$SOURCE/stuff/*.files-list | while read file; do
   2.113 -		rm -rf $fs$file
   2.114 -	done
   2.115 +	case $PACKAGE in
   2.116 +		samba-pam)
   2.117 +			copy @std
   2.118 +#			remove_already_packed
   2.119 +			PROVIDE="samba:pam"
   2.120 +			DEPENDS="acl attr dbus libcups libgnutls libldap libtdb ncurses \
   2.121 +			ncurses-libform ncurses-libpanel perl popt python talloc \
   2.122 +			talloc-python zlib pam"
   2.123 +			PROVIDE="samba-common smbclient"
   2.124 +			TAZPANEL_DAEMON="man::samba|edit::/etc/samba/smb.conf|web::$WEB_SITE"
   2.125 +			CONFIG_FILES="/etc/samba/smb.conf"
   2.126 +			;;
   2.127 +	esac
   2.128  }
   2.129  
   2.130  # Pre and post install commands for Tazpkg.
   2.131 -post_install()
   2.132 -{
   2.133 -	cat <<EOF
   2.134 -----
   2.135 -The main configuration file is /etc/samba/smb.conf
   2.136 -----
   2.137 -To start $PACKAGE server you can run :
   2.138 +post_install_samba_pam() {
   2.139 +	[ -n "$quiet" ] || cat <<EOT
   2.140  
   2.141 -    /etc/init.d/$PACKAGE start
   2.142 -
   2.143 -Or add $PACKAGE to RUN_DAEMONS in /etc/rcS.conf
   2.144 -----
   2.145 -EOF
   2.146 +	.----------------------------------------------------.
   2.147 +	| The main configuration file is /etc/samba/smb.conf |
   2.148 +	|----------------------------------------------------|
   2.149 +	| To start samba server you can run:                 |
   2.150 +	|     /etc/init.d/samba start                        |
   2.151 +	|                                                    |
   2.152 +	| Or add samba to RUN_DAEMONS in /etc/rcS.conf       |
   2.153 +	'----------------------------------------------------'
   2.154 +EOT
   2.155  }
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/samba-pam/stuff/applications/swat.desktop	Wed Nov 08 08:21:56 2017 +0100
     3.3 @@ -0,0 +1,7 @@
     3.4 +[Desktop Entry]
     3.5 +Name=SAMBA Administration
     3.6 +Name[pt_BR]=AdministraĆ§Ć£o do Samba
     3.7 +Icon=swat
     3.8 +Exec=browser http://127.0.0.1/swat/
     3.9 +Type=Application
    3.10 +Categories=System;
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/samba-pam/stuff/etc/init.d/samba	Wed Nov 08 08:21:56 2017 +0100
     4.3 @@ -0,0 +1,73 @@
     4.4 +#!/bin/sh
     4.5 +# /etc/init.d/samba : Start, stop and restart Samba server on SliTaz, at
     4.6 +# boot time or with the command line.
     4.7 +#
     4.8 +# To start Samba server at boot time, just put samba in the $RUN_DAEMONS
     4.9 +# variable of /etc/rcS.conf and configure options with /etc/daemons.conf
    4.10 +#
    4.11 +. /etc/init.d/rc.functions
    4.12 +. /etc/daemons.conf
    4.13 +
    4.14 +NAME=Samba
    4.15 +DESC="$(_ '%s server' Samba)"
    4.16 +SMBD=/usr/sbin/smbd
    4.17 +NMBD=/usr/sbin/nmbd
    4.18 +NMBPIDFILE=/var/run/samba/nmbd.pid
    4.19 +SMBPIDFILE=/var/run/samba/smbd.pid
    4.20 +
    4.21 +[ -d /var/run/samba ] || mkdir -p /var/run/samba
    4.22 +
    4.23 +case "$1" in
    4.24 +  start)
    4.25 +    if active_pidfile $SMBPIDFILE smbd ; then
    4.26 +      _ '%s is already running.' "$NAME ($SMBD)"
    4.27 +    else
    4.28 +      action 'Starting %s: %s...' "$DESC" $SMBD
    4.29 +      $SMBD -D
    4.30 +      status
    4.31 +    fi
    4.32 +    if active_pidfile $NMBPIDFILE nmbd ; then
    4.33 +      _ '%s is already running.' "$NAME ($NMBD)"
    4.34 +    else
    4.35 +      action 'Starting %s: %s...' "$DESC" $NMBD
    4.36 +      $NMBD -D
    4.37 +      status
    4.38 +    fi
    4.39 +    ;;
    4.40 +  stop)
    4.41 +    if ! active_pidfile $SMBPIDFILE smbd ; then
    4.42 +      _ '%s is not running.' "$NAME ($SMBD)"
    4.43 +    else
    4.44 +      action 'Stopping %s: %s...' "$DESC" $SMBD
    4.45 +      kill $(cat $SMBPIDFILE)
    4.46 +      status
    4.47 +    fi
    4.48 +    if ! active_pidfile $NMBPIDFILE nmbd ; then
    4.49 +      _ '%s is not running.' "$NAME ($NMBD)"
    4.50 +    else
    4.51 +      action 'Stopping %s: %s...' "$DESC" $NMBD
    4.52 +      kill $(cat $NMBPIDFILE)
    4.53 +      status
    4.54 +    fi
    4.55 +    ;;
    4.56 +  restart)
    4.57 +    $0 stop
    4.58 +    $0 start
    4.59 +    ;;
    4.60 +  reload)
    4.61 +    if ! active_pidfile $SMBPIDFILE smbd ; then
    4.62 +      _ '%s is not running.' $NAME
    4.63 +      exit 1
    4.64 +    fi
    4.65 +    action 'Reloading %s: %s...' "$DESC" $SMBD
    4.66 +    kill -HUP $(cat $SMBPIDFILE)
    4.67 +    status
    4.68 +    ;;
    4.69 +  *)
    4.70 +    emsg "<n><b>$(_ 'Usage:')</b> $0 [start|stop|restart!reload]"
    4.71 +    newline
    4.72 +    exit 1
    4.73 +    ;;
    4.74 +esac
    4.75 +
    4.76 +exit 0
     5.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.2 +++ b/samba-pam/stuff/etc/samba/smb.conf	Wed Nov 08 08:21:56 2017 +0100
     5.3 @@ -0,0 +1,10 @@
     5.4 +[global]
     5.5 +workgroup = SLITAZ
     5.6 +security = SHARE
     5.7 +
     5.8 +[homes]
     5.9 +comment = Home Directories
    5.10 +valid users = %S
    5.11 +read only = No
    5.12 +browseable = No
    5.13 +
     6.1 Binary file samba-pam/stuff/swat.png has changed