[Box Backup-dev] COMMIT r497 - in box/chris/general: . bin/bbackupd distribution/boxbackup distribution/boxbackup/contrib/rpm infrastructure infrastructure/m4 infrastructure/msvc/2005
boxbackup-dev@fluffy.co.uk
boxbackup-dev@fluffy.co.uk
Thu, 23 Feb 2006 22:28:46 +0000 (GMT)
Author: chris
Date: 2006-02-23 22:28:38 +0000 (Thu, 23 Feb 2006)
New Revision: 497
Modified:
box/chris/general/VERSION.txt
box/chris/general/bin/bbackupd/BackupDaemon.cpp
box/chris/general/configure.ac
box/chris/general/distribution/boxbackup/LINUX.txt
box/chris/general/distribution/boxbackup/contrib/rpm/boxbackup.spec
box/chris/general/infrastructure/BoxPlatform.pm.in
box/chris/general/infrastructure/m4/ax_check_mount_point.m4
box/chris/general/infrastructure/msvc/2005/boxbackup.suo
Log:
* distribution/boxbackup/contrib/rpm/boxbackup.spec
* distribution/boxbackup/LINUX.txt
* infrastructure/m4/ax_check_mount_point.m4
* infrastructure/msvc/2005/boxbackup.suo
* infrastructure/BoxPlatform.pm.in
* configure.ac
* VERSION.txt
* bin/bbackupd/BackupDaemon.cpp
- Merged changes from trunk r483 to r495
Modified: box/chris/general/VERSION.txt
===================================================================
--- box/chris/general/VERSION.txt 2006-02-23 22:27:19 UTC (rev 496)
+++ box/chris/general/VERSION.txt 2006-02-23 22:28:38 UTC (rev 497)
@@ -1,2 +1,2 @@
-0.09_trunk
+USE_SVN_VERSION
boxbackup
Modified: box/chris/general/bin/bbackupd/BackupDaemon.cpp
===================================================================
--- box/chris/general/bin/bbackupd/BackupDaemon.cpp 2006-02-23 22:27:19 UTC (rev 496)
+++ box/chris/general/bin/bbackupd/BackupDaemon.cpp 2006-02-23 22:28:38 UTC (rev 497)
@@ -1251,7 +1251,7 @@
-#ifndef HAVE_STRUCT_STATFS_F_MNTONNAME
+#if !defined(HAVE_STRUCT_STATFS_F_MNTONNAME) && !defined(HAVE_STRUCT_STATVFS_F_NMTONNAME)
// string comparison ordering for when mount points are handled
// by code, rather than the OS.
typedef struct
@@ -1315,7 +1315,7 @@
int numIDMaps = 0;
#ifdef HAVE_MOUNTS
-#ifndef HAVE_STRUCT_STATFS_F_MNTONNAME
+#if !defined(HAVE_STRUCT_STATFS_F_MNTONNAME) && !defined(HAVE_STRUCT_STATVFS_F_MNTONNAME)
// Linux and others can't tell you where a directory is mounted. So we
// have to read the mount entries from /etc/mtab! Bizarre that the OS
// itself can't tell you, but there you go.
@@ -1389,7 +1389,7 @@
ASSERT(*i == "/");
}
#endif // n NDEBUG
-#endif // n HAVE_STRUCT_STATFS_F_MNTONNAME
+#endif // n HAVE_STRUCT_STATFS_F_MNTONNAME || n HAVE_STRUCT_STATVFS_F_MNTONNAME
#endif // HAVE_MOUNTS
// Then... go through each of the entries in the configuration,
@@ -1413,11 +1413,16 @@
// Do a fsstat on the pathname to find out which mount it's on
{
-#if defined HAVE_STRUCT_STATFS_F_MNTONNAME || defined WIN32
+#if defined HAVE_STRUCT_STATFS_F_MNTONNAME || defined HAVE_STRUCT_STATVFS_F_MNTONNAME || defined WIN32
// BSD style statfs -- includes mount point, which is nice.
+#ifdef HAVE_STRUCT_STATVFS_F_MNTONNAME
+ struct statvfs s;
+ if(::statvfs(ploc->mPath.c_str(), &s) != 0)
+#else // HAVE_STRUCT_STATVFS_F_MNTONNAME
struct statfs s;
if(::statfs(ploc->mPath.c_str(), &s) != 0)
+#endif // HAVE_STRUCT_STATVFS_F_MNTONNAME
{
THROW_EXCEPTION(CommonException, OSFileError)
}
Modified: box/chris/general/configure.ac
===================================================================
--- box/chris/general/configure.ac 2006-02-23 22:27:19 UTC (rev 496)
+++ box/chris/general/configure.ac 2006-02-23 22:28:38 UTC (rev 497)
@@ -136,7 +136,13 @@
AC_FUNC_ERROR_AT_LINE
AC_TYPE_SIGNAL
AC_FUNC_STAT
-AC_CHECK_FUNCS([getpeereid kqueue lchown setproctitle getpid])
+AC_CHECK_FUNCS([getpeereid lchown setproctitle getpid])
+# NetBSD implements kqueue too differently for us to get it fixed by 0.10
+# TODO: Remove this when NetBSD kqueue implementation is working
+netbsd_hack=`echo $target_os | sed 's/netbsd.*/netbsd/'`
+if test "$netbsd_hack" != "netbsd"; then
+ AC_CHECK_FUNCS([kqueue])
+fi
AX_FUNC_SYSCALL
AX_CHECK_SYSCALL_LSEEK
AC_CHECK_FUNCS([listxattr llistxattr getxattr lgetxattr setxattr lsetxattr])
Modified: box/chris/general/distribution/boxbackup/LINUX.txt
===================================================================
--- box/chris/general/distribution/boxbackup/LINUX.txt 2006-02-23 22:27:19 UTC (rev 496)
+++ box/chris/general/distribution/boxbackup/LINUX.txt 2006-02-23 22:28:38 UTC (rev 497)
@@ -11,12 +11,14 @@
Require zlib and openssl headers for compilation -- may not be included when
installing the packages. (libssl-dev + libz-dev packages under debian)
-Bekerley DB v1 support is required. The configure script should find an
+Bekerley DB v1 or v4 support is required. The configure script should find an
appropriate db package -- and if not, use an in-memory version of the code.
However, the in-memory version is not desirable as it will lose information
over restarts of the daemon.
-Ideally, include the readline headers -- libreadline4-dev, probably.
+Ideally, use libeditline as a readline replacement. If not available then use
+GNU readline (libreadline4-dev, probably) and pass --enable-gnu-readline to
+./configure.
Modified: box/chris/general/distribution/boxbackup/contrib/rpm/boxbackup.spec
===================================================================
--- box/chris/general/distribution/boxbackup/contrib/rpm/boxbackup.spec 2006-02-23 22:27:19 UTC (rev 496)
+++ box/chris/general/distribution/boxbackup/contrib/rpm/boxbackup.spec 2006-02-23 22:28:38 UTC (rev 497)
@@ -104,7 +104,7 @@
%if %{is_suse}
ln -s ../../%{init_dir}/bbackupd $RPM_BUILD_ROOT%{_sbindir}/rcbbackupd
%endif
-%define client_dir parcels/%{ident}-backup-client-Linux
+%define client_dir parcels/%{ident}-backup-client-linux-gnu
install %{client_dir}/bbackupd $RPM_BUILD_ROOT%{_sbindir}
install %{client_dir}/bbackupquery $RPM_BUILD_ROOT%{_sbindir}
install %{client_dir}/bbackupctl $RPM_BUILD_ROOT%{_sbindir}
@@ -117,7 +117,7 @@
%if %{is_suse}
ln -s ../../%{init_dir}/bbstored $RPM_BUILD_ROOT%{_sbindir}/rcbbstored
%endif
-%define server_dir parcels/%{ident}-backup-server-Linux
+%define server_dir parcels/%{ident}-backup-server-linux-gnu
install %{server_dir}/bbstored $RPM_BUILD_ROOT%{_sbindir}
install %{server_dir}/bbstoreaccounts $RPM_BUILD_ROOT%{_sbindir}
install %{server_dir}/bbstored-certs $RPM_BUILD_ROOT%{_bindir}
Modified: box/chris/general/infrastructure/BoxPlatform.pm.in
===================================================================
--- box/chris/general/infrastructure/BoxPlatform.pm.in 2006-02-23 22:27:19 UTC (rev 496)
+++ box/chris/general/infrastructure/BoxPlatform.pm.in 2006-02-23 22:28:38 UTC (rev 497)
@@ -34,6 +34,27 @@
$product_name = <VERSION>;
chomp $product_name;
close VERSION;
+ if($product_version eq 'USE_SVN_VERSION')
+ {
+ # for developers, use SVN version
+ my $svnversion = `svnversion .`;
+ chomp $svnversion;
+ $svnversion =~ tr/0-9A-Za-z/_/c;
+ open INFO,'svn info . |';
+ my $svnurl;
+ while(<INFO>)
+ {
+ if(m/^URL: (.+?)[\n\r]+/)
+ {
+ $svnurl = $1
+ }
+ }
+ close INFO;
+ $svnurl =~ m!box/(.+)$!;
+ my $svndir = $1;
+ $svndir =~ tr/0-9A-Za-z/_/c;
+ $product_version = $svndir.'_'.$svnversion;
+ }
# where to put the files
$install_into_dir = '@bindir_expanded@';
Modified: box/chris/general/infrastructure/m4/ax_check_mount_point.m4
===================================================================
--- box/chris/general/infrastructure/m4/ax_check_mount_point.m4 2006-02-23 22:27:19 UTC (rev 496)
+++ box/chris/general/infrastructure/m4/ax_check_mount_point.m4 2006-02-23 22:28:38 UTC (rev 497)
@@ -10,6 +10,7 @@
dnl HAVE_STRUCT_MNTENT_MNT_DIR
dnl HAVE_STRUCT_MNTTAB_MNT_MOUNTP
dnl HAVE_STRUCT_STATFS_F_MNTONNAME
+dnl HAVE_STRUCT_STATVFS_F_MNTONNAME
dnl Also ACTION-IF-TRUE and ACTION-IF-FALSE are run as appropriate
dnl
dnl @category C
@@ -33,6 +34,13 @@
#endif
#include <sys/mount.h>
]])
+ # NetBSD
+ AC_CHECK_MEMBERS([struct statvfs.f_mntonname],,, [[
+ #ifdef HAVE_SYS_PARAM_H
+ #include <sys/param.h>
+ #endif
+ #include <sys/mount.h>
+ ]])
# Linux
AC_CHECK_MEMBERS([struct mntent.mnt_dir],,, [[#include <mntent.h>]])
# Solaris
@@ -41,6 +49,7 @@
#include <sys/mnttab.h>
]])
if test "x$ac_cv_member_struct_statfs_f_mntonname" = "xyes" || \
+ test "x$ac_cv_member_struct_statvfs_f_mntonname" = "xyes" || \
test "x$ac_cv_member_struct_mntent_mnt_dir" = "xyes" || \
test "x$ac_cv_member_struct_mnttab_mnt_mountp" = "xyes"
then
Modified: box/chris/general/infrastructure/msvc/2005/boxbackup.suo
===================================================================
(Binary files differ)