Hello community, here is the log from the commit of package smbtad for openSUSE:Factory checked in at Mon Nov 15 18:17:11 CET 2010. -------- --- smbtad/smbtad.changes 2010-09-19 23:19:44.000000000 +0200 +++ smbtad/smbtad.changes 2010-11-11 14:04:00.000000000 +0100 @@ -1,0 +2,8 @@ +Mon Nov 8 14:25:21 UTC 2010 - hhetter@novell.com + +- update to version 1.1: +- bnc#649840, compile with older versions of talloc +- bnc#651112, introduce rcsmbtad start/stop script +- bnc#651800, fix configuration file support + +------------------------------------------------------------------- calling whatdependson for head-i586 Old: ---- smbtad-1.0.tar.bz2 New: ---- smbtad-1.1.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ smbtad.spec ++++++ --- /var/tmp/diff_new_pack.O4My4D/_old 2010-11-15 18:16:35.000000000 +0100 +++ /var/tmp/diff_new_pack.O4My4D/_new 2010-11-15 18:16:35.000000000 +0100 @@ -1,5 +1,5 @@ # -# spec file for package smbtad (Version 1.0) +# spec file for package smbtad (Version 1.1) # # Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. # @@ -25,13 +25,15 @@ BuildRecommends: libiniparser-devel License: GPLv3+ Group: Productivity/Networking/Samba -Version: 1.0 +Version: 1.1 Release: 1 Summary: A collector of smbd share usage data Url: http://github.com/hhetter/smbtad Source0: %{name}-%{version}.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-build +%define INITDIR %{_sysconfdir}/init.d + %description smbtad is the data receiver of the SMB Traffic Analyzer project. With SMB Traffic Analyzer statistics about the data flow on a Samba network can be created. @@ -68,6 +70,8 @@ make DESTDIR=%{buildroot} install %endif popd build +mkdir -p %{buildroot}/usr/sbin +ln -s /etc/init.d/smbtad %{buildroot}/usr/sbin/rcsmbtad %clean %__rm -rf %{buildroot} @@ -75,5 +79,7 @@ %files %defattr(-,root,root) %{_bindir}/smbtad +%{_sbindir}/rcsmbtad +%attr(0754,root,root) %config %{INITDIR}/smbtad %changelog ++++++ smbtad-1.0.tar.bz2 -> smbtad-1.1.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/smbtad-1.0/CMakeLists.txt new/smbtad-1.1/CMakeLists.txt --- old/smbtad-1.0/CMakeLists.txt 2010-10-25 20:00:37.000000000 +0200 +++ new/smbtad-1.1/CMakeLists.txt 2010-11-06 21:28:20.000000000 +0100 @@ -76,8 +76,7 @@ set_target_properties(iniparser PROPERTIES IMPORTED_LOCATION ${CMAKE_SOURCE_DIR}/iniparser3.0b/libiniparser.a) ENDIF() - - +file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/make_symlink.cmake "exec_program(${CMAKE_COMMAND} ARGS -E create_symlink /etc/init.d/smbtad /usr/sbin/rcsmbtad)") SET(CurrentExe "smbtad") ADD_EXECUTABLE(${CurrentExe} @@ -96,10 +95,8 @@ src/monitor-list.c src/sendlist.c src/throughput-list.c) -TARGET_LINK_LIBRARIES(${CurrentExe} ${Libraries}) - - - +TARGET_LINK_LIBRARIES(${CurrentExe} ${Libraries}) INSTALL(TARGETS smbtad DESTINATION bin) - +INSTALL(PROGRAMS dist/smbtad DESTINATION /etc/init.d/) +INSTALL(SCRIPT ${CMAKE_CURRENT_BINARY_DIR}/make_symlink.cmake) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/smbtad-1.0/dist/smbtad new/smbtad-1.1/dist/smbtad --- old/smbtad-1.0/dist/smbtad 1970-01-01 01:00:00.000000000 +0100 +++ new/smbtad-1.1/dist/smbtad 2010-11-06 21:28:20.000000000 +0100 @@ -0,0 +1,94 @@ +#! /bin/sh +# Copyright (c) 2010 Holger Hetterich +# +# Based on the smb script by Lars Müller <lmuelle@suse.de> +# +# /etc/init.d/smbtad +# and its symbolic link +# /usr/sbin/rcsmbtad +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. +# +### BEGIN INIT INFO +# Provides: smbtad +# Required-Start: $network $syslog +# Should-Start: +# Required-Stop: $network $syslog +# Should-Stop: +# Default-Start: 3 5 +# Default-Stop: 0 1 2 6 +# Short-Description: SMB Traffic Analyzer Daemon +# Description: SMB Traffic Analyzer Daemon +### END INIT INFO + +SMBTAD_BIN="/usr/bin/smbtad" +SMBTAD_CONF="/etc/smbtad.conf" + +. /etc/rc.status +rc_reset + +# Check for missing binary +if [ ! -x ${SMBTAD_BIN} ]; then + echo -n >&2 "SMB Traffic Analyzer daemon, ${SMBTAD_BIN} is not installed. " + rc_status -s + exit 5 +fi + +# be extra carefull cause connection fail if TMPDIR is not writeable +export TMPDIR="/var/tmp" + +case "$1" in + start) + echo -n "Starting SMB Traffic Analyzer daemon " + if [ ! -f ${SMBTAD_CONF} ]; then + echo -n >&2 "smbtad configuration file, ${SMBTAD_CONF} does not exist. " + rc_status -s + exit 6 + fi + checkproc ${SMBTAD_BIN} + case $? in + 0) echo -n "- Warning: daemon already running. " ;; + esac + test -f /etc/sysconfig/language && \ + . /etc/sysconfig/language + export LC_ALL="$RC_LC_ALL" + export LC_CTYPE="$RC_LC_CTYPE" + export LANG="$RC_LANG" + startproc ${SMBTAD_BIN} -c ${SMBTAD_CONF} + unset LC_ALL LC_CTYPE LANG + rc_status -v + ;; + stop) + echo -n "Shutting down SMB Traffic Analyzer daemon " + checkproc ${SMBTAD_BIN} || \ + echo -n " Warning: daemon not running. " + killproc -t 10 ${SMBTAD_BIN} + rc_status -v + ;; + restart) + $0 stop + $0 start + rc_status + ;; + status) + echo -n "Checking for Samba SMB daemon " + checkproc ${SMBTAD_BIN} + rc_status -v + ;; + *) + echo "Usage: $0 {start|stop|status|restart}" + exit 1 + ;; +esac +rc_exit diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/smbtad-1.0/dist/smbtad.conf_example new/smbtad-1.1/dist/smbtad.conf_example --- old/smbtad-1.0/dist/smbtad.conf_example 1970-01-01 01:00:00.000000000 +0100 +++ new/smbtad-1.1/dist/smbtad.conf_example 2010-11-06 21:28:20.000000000 +0100 @@ -0,0 +1,15 @@ +[general] + debug_level = 0 + + +[network] + port_number = 3490 + query_port = 3491 + +[database] + sqlite_filename = /tmp/testfile.db + +[maintenance] + interval = 00:01:00 + config = 01,00:00:00 + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/smbtad-1.0/dist/smbtad.spec new/smbtad-1.1/dist/smbtad.spec --- old/smbtad-1.0/dist/smbtad.spec 1970-01-01 01:00:00.000000000 +0100 +++ new/smbtad-1.1/dist/smbtad.spec 2010-11-06 21:28:20.000000000 +0100 @@ -0,0 +1,83 @@ +# +# spec file for package smbtad +# +# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# + +# norootforbuild + + +Name: smbtad +BuildRequires: cmake libtalloc-devel +BuildRequires: sqlite3-devel +Requires: sqlite3 >= 3.7 +BuildRecommends: libiniparser-devel +License: GPLv3+ +Group: Productivity/Networking/Samba +Version: 1.0 +Release: 1 +Summary: A collector of smbd share usage data +Url: http://github.com/hhetter/smbtad +Source0: %{name}-%{version}.tar.bz2 +BuildRoot: %{_tmppath}/%{name}-%{version}-build + +%define INITDIR %{_sysconfdir}/init.d + +%description +smbtad is the data receiver of the SMB Traffic Analyzer project. +With SMB Traffic Analyzer statistics about the data flow on a Samba network can be created. +Please see http://holger123.wordpress.com/smb-traffic-analyzer/ for more information. + +%prep +%setup -q + +%build +if test ! -e "build"; then + %{__mkdir} build +fi + +pushd build +cmake \ + -DCMAKE_C_FLAGS:STRING="%{optflags}" \ + -DCMAKE_CXX_FLAGS:STRING="%{optflags}" \ + -DCMAKE_SKIP_RPATH=ON \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + -DCMAKE_INSTALL_PREFIX=%{_prefix} \ + -DSYSCONF_INSTALL_DIR=%{_sysconfdir} \ +%if %{_lib} == lib64 + -DLIB_SUFFIX=64 \ +%endif + %{_builddir}/%{name}-%{version} +%__make %{?jobs:-j%jobs} VERBOSE=1 +popd build + +%install +pushd build +%if 0%{?suse_version} +%makeinstall +%else +make DESTDIR=%{buildroot} install +%endif +popd build + + +%clean +%__rm -rf %{buildroot} + +%files +%defattr(-,root,root) +%{_bindir}/smbtad +%{_sbindir}/rcsmbtad +%attr(0754,root,root) %config %{INITDIR}/smbtad +%changelog diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/smbtad-1.0/include/includes.h new/smbtad-1.1/include/includes.h --- old/smbtad-1.0/include/includes.h 2010-10-25 20:00:37.000000000 +0200 +++ new/smbtad-1.1/include/includes.h 2010-11-06 21:28:20.000000000 +0100 @@ -49,6 +49,13 @@ #include "monitor-list.h" #include "sendlist.h" #include "throughput-list.h" + +/* define TALLOC_FREE when older talloc versions are used */ +#ifndef TALLOC_FREE + #define TALLOC_FREE(ctx) do { talloc_free(ctx); ctx=NULL; } while(0) +#endif + + /** * Debug Levels: * 0 -> only fatal errors which lead to terminate stad diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/smbtad-1.0/include/version.h new/smbtad-1.1/include/version.h --- old/smbtad-1.0/include/version.h 2010-10-25 20:00:37.000000000 +0200 +++ new/smbtad-1.1/include/version.h 2010-11-06 21:28:20.000000000 +0100 @@ -1,2 +1,2 @@ #define SMBTA_LICENSE "License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>" -#define STAD2_VERSION "1.0" +#define STAD2_VERSION "1.1" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/smbtad-1.0/src/configuration.c new/smbtad-1.1/src/configuration.c --- old/smbtad-1.0/src/configuration.c 2010-10-25 20:00:37.000000000 +0200 +++ new/smbtad-1.1/src/configuration.c 2010-11-06 21:28:20.000000000 +0100 @@ -116,8 +116,17 @@ } cc = iniparser_getstring(Mydict,"general:keyfile",NULL); if (cc != NULL) { + c->keyfile = strdup(cc); configuration_load_key_from_file( c); } + cc = iniparser_getstring(Mydict,"maintenance:interval",NULL); + if (cc != NULL) { + strncpy(c->maintenance_timer_str,cc,199); + } + cc = iniparser_getstring(Mydict,"maintenance:config",NULL); + if (cc != NULL) { + strncpy(c->maint_run_time_str,cc,199); + } return 0; } @@ -247,7 +256,7 @@ char *Begin; if ( Helper==NULL ) { printf("\n\nERROR: The maintenance-timer-conf value is " - "in the wrong format! 1\n"); + "in the wrong format! \n"); exit (0); } *Helper='\0'; @@ -257,7 +266,7 @@ if ( Helper==NULL) { printf("\n\nERROR: The maintenance-timer-conf value is in" - " the wrong format! 2\n"); + " the wrong format! \n"); exit (0); } *Helper='\0'; @@ -268,7 +277,7 @@ if ( Helper==NULL) { printf("\n\nERROR: The maintenance-timer-conf value is " - "in the wrong format! 3\n"); + "in the wrong format! \n"); exit (0); } *Helper='\0'; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/smbtad-1.0/src/protocol.c new/smbtad-1.1/src/protocol.c --- old/smbtad-1.0/src/protocol.c 2010-10-25 20:00:37.000000000 +0200 +++ new/smbtad-1.1/src/protocol.c 2010-11-06 21:28:20.000000000 +0100 @@ -156,7 +156,7 @@ */ int protocol_get_subversion( char *header ) { - int retval; + int retval; char conv[4]; conv[0] = header[3]; conv[1] = '\0'; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org