OpenPKG CVS Repository http://cvs.openpkg.org/ ____________________________________________________________________________
Server: cvs.openpkg.org Name: Michael Schloh Root: /e/openpkg/cvs Email: [EMAIL PROTECTED] Module: openpkg-src openpkg-web openpkg$ Date: 29-Sep-2003 18:45:10 Branch: HEAD Handle: 2003092917450405 Added files: openpkg-re/vcheck vc.samba3 openpkg-src/samba3 rc.samba samba3.spec smb.conf smb.hosts Modified files: openpkg-web news.txt Log: new package: samba3 3.0.0 (SMB/CIFS Server) Summary: Revision Changes Path 1.1 +9 -0 openpkg-re/vcheck/vc.samba3 1.1 +69 -0 openpkg-src/samba3/rc.samba 1.1 +175 -0 openpkg-src/samba3/samba3.spec 1.1 +91 -0 openpkg-src/samba3/smb.conf 1.1 +7 -0 openpkg-src/samba3/smb.hosts 1.6783 +1 -0 openpkg-web/news.txt ____________________________________________________________________________ patch -p0 <<'@@ .' Index: openpkg-re/vcheck/vc.samba3 ============================================================================ $ cvs diff -u -r0 -r1.1 vc.samba3 --- /dev/null 2003-09-29 18:45:05.000000000 +0200 +++ vc.samba3 2003-09-29 18:45:05.000000000 +0200 @@ -0,0 +1,9 @@ +config = { +} + +prog samba3 = { + version = 7.42 + url = ftp://ftp.samba3.org/pub/samba3/ + regex = samba3-(__VER__)\.tar\.gz +} + @@ . patch -p0 <<'@@ .' Index: openpkg-src/samba3/rc.samba ============================================================================ $ cvs diff -u -r0 -r1.1 rc.samba --- /dev/null 2003-09-29 18:45:09.000000000 +0200 +++ rc.samba 2003-09-29 18:45:09.000000000 +0200 @@ -0,0 +1,69 @@ [EMAIL PROTECTED]@/lib/openpkg/bash @l_prefix@/etc/rc +## +## rc.samba -- Run-Commands +## + +%config + samba_enable="$openpkg_rc_def" + samba_log_prolog="true" + samba_log_epilog="true" + samba_log_numfiles="10" + samba_log_minsize="1M" + samba_log_complevel="9" + +%common + samba_smbd_pidfile="@l_prefix@/var/samba/run/smbd.pid" + samba_nmbd_pidfile="@l_prefix@/var/samba/run/nmbd.pid" + samba_signal () { + [ -f $samba_smbd_pidfile ] \ + && kill -$1 `cat $samba_smbd_pidfile` + local rc=$? + + [ -f $samba_nmbd_pidfile ] \ + && kill -$1 `cat $samba_nmbd_pidfile` \ + && [ $rc -eq 0 ] + } + +%status -u @l_susr@ -o + samba_usable="unknown" + samba_active="no" + rcService samba enable yes && \ + samba_signal 0 && samba_active="yes" + echo "samba_enable=\"$samba_enable\"" + echo "samba_usable=\"$samba_usable\"" + echo "samba_active=\"$samba_active\"" + +%start -u @l_susr@ + rcService samba enable yes || exit 0 + rcService samba active yes && exit 0 + @l_prefix@/sbin/smbd -D + @l_prefix@/sbin/nmbd -D + +%stop -u @l_susr@ + rcService samba enable yes || exit 0 + rcService samba active no && exit 0 + samba_signal TERM + sleep 2 + rm -f $samba_smbd_pidfile $samba_nmbd_pidfile 2>/dev/null || true + +%restart -u @l_susr@ + rcService samba enable yes || exit 0 + rcService samba active no && exit 0 + rc samba stop start + +%reload -u @l_susr@ + rcService samba enable yes || exit 0 + rcService samba active no && exit 0 + samba_signal HUP + +%daily -u @l_susr@ + rcService samba enable yes || exit 0 + + # rotate logfile + shtool rotate -f \ + -n ${samba_log_numfiles} -s ${samba_log_minsize} -d \ + -z ${samba_log_complevel} -m 644 -o @l_susr@ -g @l_mgrp@ \ + -P "${samba_log_prolog}" \ + -E "${samba_log_epilog} && rc samba restart" \ + @l_prefix@/var/samba/run/log.[sn]mbd + @@ . patch -p0 <<'@@ .' Index: openpkg-src/samba3/samba3.spec ============================================================================ $ cvs diff -u -r0 -r1.1 samba3.spec --- /dev/null 2003-09-29 18:45:09.000000000 +0200 +++ samba3.spec 2003-09-29 18:45:09.000000000 +0200 @@ -0,0 +1,175 @@ +## +## samba.spec -- OpenPKG RPM Specification +## Copyright (c) 2000-2003 The OpenPKG Project <http://www.openpkg.org/> +## Copyright (c) 2000-2003 Ralf S. Engelschall <[EMAIL PROTECTED]> +## Copyright (c) 2000-2003 Cable & Wireless <http://www.cw.com/> +## +## Permission to use, copy, modify, and distribute this software for +## any purpose with or without fee is hereby granted, provided that +## the above copyright notice and this permission notice appear in all +## copies. +## +## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED +## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR +## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF +## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT +## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +## SUCH DAMAGE. +## + +# package information +Name: samba3 +Summary: SMB/CIFS Server +URL: http://www.samba.org/ +Vendor: Andrew Tridgell +Packager: The OpenPKG Project +Distribution: OpenPKG [BASE] +Group: Filesystem +License: GPL +Version: 3.0.0 +Release: 20030929 + +# package options +%option with_pam no +%option with_swat no + +# list of sources +Source0: http://download.samba.org/samba/ftp/samba-%{version}.tar.gz +Source1: smb.conf +Source2: smb.hosts +Source3: rc.samba + +# build information +Prefix: %{l_prefix} +BuildRoot: %{l_buildroot} +BuildPreReq: OpenPKG, openpkg >= 20030718 +PreReq: OpenPKG, openpkg >= 20030718, perl +BuildPreReq: openssl +PreReq: openssl +%if "%{with_pam}" == "yes" +BuildPreReq: PAM +PreReq: PAM +%endif +AutoReq: no +AutoReqProv: no +Provides: samba + +%description + Samba is an open source software suite that provides seamless file + and print services to SMB/CIFS clients. + +%prep + %setup -q -n samba-%{version} + +%build + cd source + %{l_shtool} subst \ + -e 's;/usr/bin/perl;%{l_prefix}/bin/perl;g' \ + script/findsmb.in + CC="%{l_cc}" + CFLAGS="%{l_cflags -O}" + CPPFLAGS="%{l_cppflags openssl} -DOPENSSL_DISABLE_OLD_DES_SUPPORT" + LDFLAGS="%{l_ldflags}" +%if "%{with_pam}" == "yes" + CPPFLAGS="$CPPFLAGS -I`%{l_prefix}/etc/rc --query pam_incdir`" + LDFLAGS="$LDFLAGS -L`%{l_prefix}/etc/rc --query pam_libdir`" +%endif + export CC + export CFLAGS + export LDFLAGS + export CPPFLAGS + ./configure \ + --prefix=%{l_prefix} \ + --localstatedir=%{l_prefix}/var/samba/run \ + --sysconfdir=%{l_prefix}/etc/samba \ + --with-privatedir=%{l_prefix}/var/samba/run \ + --with-sambaconfdir=%{l_prefix}/etc/samba \ + --with-lockdir=%{l_prefix}/var/samba/run \ + --with-swatdir=%{l_prefix}/share/samba \ + --with-codepagedir=%{l_prefix}/share/samba \ + --with-ssl \ + --with-sslinc=%{l_prefix}/include \ + --with-included-popt \ +%if "%{with_pam}" == "yes" + --with-pam \ +%endif + --with-vfs + %{l_make} %{l_mflags} + +%install + rm -rf $RPM_BUILD_ROOT + %{l_shtool} mkdir -f -p -m 755 \ + $RPM_BUILD_ROOT%{l_prefix} \ + $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d \ + $RPM_BUILD_ROOT%{l_prefix}/etc/samba \ + $RPM_BUILD_ROOT%{l_prefix}/var/samba/spool \ + $RPM_BUILD_ROOT%{l_prefix}/var/samba/netlogon \ + $RPM_BUILD_ROOT%{l_prefix}/var/samba/profiles + ( cd source + %{l_make} %{l_mflags} \ + DESTDIR=$RPM_BUILD_ROOT \ + LIBDIR=%{l_prefix}/lib/samba \ + installbin installman installscripts installdat installmodules +%if "%{with_swat}" == "yes" + %{l_make} %{l_mflags} installswat DESTDIR=$RPM_BUILD_ROOT +%endif + ) || exit $? + l_hostname=`%{l_shtool} echo -e %h%d` + %{l_shtool} install -c -m 644 %{l_value -s -a} \ + -e "s;@l_hostname@;$l_hostname;g" \ + %{SOURCE smb.conf} \ + %{SOURCE smb.hosts} \ + $RPM_BUILD_ROOT%{l_prefix}/etc/samba/ + %{l_shtool} install -c -m 755 %{l_value -s -a} \ + %{SOURCE rc.samba} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/ + strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true + strip $RPM_BUILD_ROOT%{l_prefix}/sbin/* >/dev/null 2>&1 || true + %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \ + %{l_files_std} \ + '%config %{l_prefix}/etc/samba/*' \ + '%attr(1777,%{l_musr},%{l_mgrp}) %{l_prefix}/var/samba/spool' \ + '%attr(1777,%{l_musr},%{l_mgrp}) %{l_prefix}/var/samba/profiles' + +%files -f files + +%clean + rm -rf $RPM_BUILD_ROOT + +%pre + # before upgrade, save status and stop service + [ $1 -eq 2 ] || exit 0 + eval `%{l_rc} samba status 2>/dev/null | tee %{l_tmpfile}` + %{l_rc} samba stop 2>/dev/null + exit 0 + +%post +%if "%{with_pam}" == "yes" + if [ $1 -eq 1 ]; then + # after install, add PAM configuration entry + $RPM_INSTALL_PREFIX/sbin/pamtool --add --smart --name=smbd + fi +%endif + if [ $1 -eq 2 ]; then + # after upgrade, restore status + { eval `cat %{l_tmpfile}`; rm -f %{l_tmpfile}; true; } >/dev/null 2>&1 + [ ".$samba_active" = .yes ] && %{l_rc} samba start + fi + exit 0 + +%preun + # before erase, stop service and remove log files + [ $1 -eq 0 ] || exit 0 + %{l_rc} samba stop 2>/dev/null + rm -f $RPM_INSTALL_PREFIX/var/samba/run/log.[sn]mbd* >/dev/null 2>&1 || true +%if "%{with_pam}" == "yes" + # remove PAM configuration entry + $RPM_INSTALL_PREFIX/sbin/pamtool --remove --smart --name=smbd +%endif + exit 0 + @@ . patch -p0 <<'@@ .' Index: openpkg-src/samba3/smb.conf ============================================================================ $ cvs diff -u -r0 -r1.1 smb.conf --- /dev/null 2003-09-29 18:45:09.000000000 +0200 +++ smb.conf 2003-09-29 18:45:09.000000000 +0200 @@ -0,0 +1,91 @@ +## +## smb.conf -- Samba Configuration +## + +# global parameters +[global] + workgroup = WORKGROUP + server string = @l_hostname@ (Samba %v) + netbios name = @l_hostname@ + bind interfaces only = yes + interfaces = 127.0.0.1 + smb passwd file = @l_prefix@/etc/samba/smb.passwd + pid directory = @l_prefix@/var/samba/run + lock directory = @l_prefix@/var/samba/run/locks + security = user + encrypt passwords = yes + domain admin group = root + domain logons = yes + share modes = no + printing = bsd + printcap name = /etc/printcap + load printers = yes + guest account = nobody + socket options = TCP_NODELAY + mangle case = no + case sensitive = no + default case = lower + preserve case = yes + short preserve case = yes + dead time = 0 + debug level = 0 + status = yes + wins support = no + getwd cache = yes + widelinks = yes + log level = 1 + os level = 64 + preferred master = yes + domain master = yes + local master = yes + logon path = \\%N\profiles\%u + logon drive = U: + logon home = \\%N\%u + logon script = logon.cmd + use client driver = yes + +# magic share for logons +[netlogon] + path = @l_prefix@/var/samba/netlogon + writeable = no + create mask = 0600 + directory mask = 0700 + +# magic share for profiles +[profiles] + path = @l_prefix@/var/samba/profiles + writeable = yes + +# magic share for all user home directories +[homes] + comment = Home Directories + browseable = yes + read only = no + create mode = 0664 + map archive = no + +# magic share for all printers +[printers] + comment = System Printers + path = @l_prefix@/var/samba/spool + create mask = 0700 + printable = yes + browseable = yes + guest ok = yes + guest account = nobody + public = no + writable = no + +# custom share, usable by all users +[tmp] + comment = Public + path = /tmp + browseable = yes + public = yes + writeable = yes + force create mode = 0775 + create mask = 0775 + force group = nobody + read only = no + public = yes + @@ . patch -p0 <<'@@ .' Index: openpkg-src/samba3/smb.hosts ============================================================================ $ cvs diff -u -r0 -r1.1 smb.hosts --- /dev/null 2003-09-29 18:45:09.000000000 +0200 +++ smb.hosts 2003-09-29 18:45:09.000000000 +0200 @@ -0,0 +1,7 @@ +## +## smb.hosts -- Samba LMHOSTS +## + +# Sample Entry: +# 192.168.0.1 FOO + @@ . patch -p0 <<'@@ .' Index: openpkg-web/news.txt ============================================================================ $ cvs diff -u -r1.6782 -r1.6783 news.txt --- openpkg-web/news.txt 29 Sep 2003 13:28:15 -0000 1.6782 +++ openpkg-web/news.txt 29 Sep 2003 16:45:05 -0000 1.6783 @@ -1,3 +1,4 @@ +29-Sep-2003: New package: P<samba3-3.0.0-20030929> 29-Sep-2003: Upgraded package: P<arpd-0.2-20030929> 29-Sep-2003: Upgraded package: P<openpkg-20030929-20030929> 29-Sep-2003: Upgraded package: P<lyx-1.3.3-20030929> @@ . ______________________________________________________________________ The OpenPKG Project www.openpkg.org CVS Repository Commit List [EMAIL PROTECTED]