grobian@gentoo.org: * change /etc/box into /etc/boxbackup * don't do anything in /usr/local/bin, install in /usr/sbin instead * remove Darwin/OSX Fink support and dynamic parallelising * respect DESTDIR on install --- boxbackup-0.10/bin/bbackupd/bbackupd-config +++ boxbackup-0.10/bin/bbackupd/bbackupd-config @@ -56,7 +56,7 @@ Usage: bbackupd-config config-dir backup-mode account-num server-hostname working-dir backup-dir [more backup directories] -config-dir usually /etc/box +config-dir usually /etc/boxbackup backup-mode is lazy or snapshot lazy mode runs continously, uploading files over a specified age snapshot mode uploads a snapshot of the filesystem when instructed explicitly @@ -92,7 +92,7 @@ } # default locations -my $default_config_location = '/etc/box/bbackupd.conf'; +my $default_config_location = '/etc/boxbackup/bbackupd.conf'; # command line parameters my ($config_dir,$backup_mode,$account_num,$server,$working_dir,@tobackup) = @ARGV; @@ -540,7 +540,7 @@ more files will be backed up. You want to know about this. 6) Start the backup daemon with the command - /usr/local/bin/bbackupd$daemon_args + /usr/sbin/bbackupd$daemon_args in /etc/rc.local, or your local equivalent. Note that bbackupd must run as root. __E @@ -550,7 +550,7 @@ 7) Set up a cron job to run whenever you want a snapshot of the file system to be taken. Run the command - /usr/local/bin/bbackupctl -q$ctl_daemon_args sync + /usr/sbin/bbackupctl -q$ctl_daemon_args sync __E } print <<__E; --- boxbackup-0.10/bin/bbstored/bbstored-config +++ boxbackup-0.10/bin/bbstored/bbstored-config @@ -57,7 +57,7 @@ Usage: bbstored-config config-dir server-hostname username [raidfile-config] -config-dir usually /etc/box +config-dir usually /etc/boxbackup server-hostname is the hostname used by clients to connect to this server username is the user to run the server under raidfile-config is optional. Use if you have a non-standard raidfile.conf file. @@ -83,7 +83,7 @@ } # default locations -my $default_config_location = '/etc/box/bbstored.conf'; +my $default_config_location = '/etc/boxbackup/bbstored.conf'; # command line parameters my ($config_dir,$server,$username,$raidfile_config) = @ARGV; @@ -270,7 +270,7 @@ 4) Create accounts with bbstoreaccounts 5) Start the backup store daemon with the command - /usr/local/bin/bbstored$daemon_args + /usr/sbin/bbstored$daemon_args in /etc/rc.local, or your local equivalent. =================================================================== --- boxbackup-0.10/lib/raidfile/raidfile-config +++ boxbackup-0.10/lib/raidfile/raidfile-config @@ -57,7 +57,7 @@ Usage: raidfile-config config-dir block-size dir0 [dir1 dir2] -config-dir usually /etc/box +config-dir usually /etc/boxbackup block-size must be a power of two, and usually the block or fragment size of your filing system dir0, dir1, dir2 are the directories used as the root of the raid file system --- boxbackup-0.10/lib/raidfile/RaidFileController.h +++ boxbackup-0.10/lib/raidfile/RaidFileController.h @@ -120,7 +120,7 @@ ~RaidFileController(); public: - void Initialise(const char *ConfigFilename = "/etc/box/raidfile.conf"); + void Initialise(const char *ConfigFilename = "/etc/boxbackup/raidfile.conf"); int GetNumDiscSets() {return mSetList.size();} // -------------------------------------------------------------------------- --- boxbackup-0.10/infrastructure/BoxPlatform.pm.in +++ boxbackup-0.10/infrastructure/BoxPlatform.pm.in @@ -37,26 +37,6 @@ # where to put the files $install_into_dir = '@bindir_expanded@'; - - # if it's Darwin, - if($build_os eq 'Darwin') - { - # see how many processors there are, and set make flags accordingly - my $cpus = `sysctl hw.ncpu`; - if($cpus =~ m/hw.ncpu:\s(\d+)/ && $1 > 1) - { - print "$1 processors detected, will set make to perform concurrent jobs\n"; - $sub_make_options = ' -j '.($1 + 1); - } - - # test for fink installation - if(-d '/sw/include' && -d '/sw/lib') - { - print "Fink installation detected, will use headers and libraries\n\n\n"; - $platform_compile_line_extra = '-I/sw/include '; - $platform_link_line_extra = '-L/sw/lib '; - } - } } sub make_flag --- boxbackup-0.10/infrastructure/makeparcels.pl +++ boxbackup-0.10/infrastructure/makeparcels.pl @@ -172,7 +172,8 @@ $name = $1; } - print SCRIPT "install $name $install_into_dir\n"; + print SCRIPT "mkdir -p \${DESTDIR}$install_into_dir/\n"; + print SCRIPT "install $name \${DESTDIR}$install_into_dir/$name\n"; } close SCRIPT; --- boxbackup-0.10/bin/bbstored/BackupConstants.h +++ boxbackup-0.10/bin/bbstored/BackupConstants.h @@ -48,7 +48,7 @@ #ifndef BACKUPCONSTANTS__H #define BACKUPCONSTANTS__H -#define BACKUP_STORE_DEFAULT_ACCOUNT_DATABASE_FILE "/etc/box/backupstoreaccounts" +#define BACKUP_STORE_DEFAULT_ACCOUNT_DATABASE_FILE "/etc/boxbackup/backupstoreaccounts" // 15 minutes to timeout (milliseconds) #define BACKUP_STORE_TIMEOUT (15*60*1000) --- boxbackup-0.10/lib/common/BoxPortsAndFiles.h +++ boxbackup-0.10/lib/common/BoxPortsAndFiles.h @@ -53,7 +53,7 @@ // Backup store daemon #define BOX_PORT_BBSTORED (BOX_PORT_BASE+1) -#define BOX_FILE_BBSTORED_DEFAULT_CONFIG "/etc/box/bbstored.conf" +#define BOX_FILE_BBSTORED_DEFAULT_CONFIG "/etc/boxbackup/bbstored.conf" // directory within the RAIDFILE root for the backup store daemon #define BOX_RAIDFILE_ROOT_BBSTORED "backup" @@ -61,11 +61,11 @@ #ifdef WIN32 #define BOX_FILE_BBACKUPD_DEFAULT_CONFIG "C:\\Program Files\\Box Backup\\bbackupd.conf" #else -#define BOX_FILE_BBACKUPD_DEFAULT_CONFIG "/etc/box/bbackupd.conf" +#define BOX_FILE_BBACKUPD_DEFAULT_CONFIG "/etc/boxbackup/bbackupd.conf" #endif // RaidFile conf location default -#define BOX_FILE_RAIDFILE_DEFAULT_CONFIG "/etc/box/raidfile.conf" +#define BOX_FILE_RAIDFILE_DEFAULT_CONFIG "/etc/boxbackup/raidfile.conf" // Default name of the named pipe #define BOX_NAMED_PIPE_NAME L"\\\\.\\pipe\\boxbackup" --- boxbackup-0.10/notes/backup_encryption.txt +++ boxbackup-0.10/notes/backup_encryption.txt @@ -33,7 +33,8 @@ The file data is encrypted with AES in CBC mode, with a 256 bit key (max length). Blowfish is used elsewhere because the larger block size of AES, while more secure, would be terribly space inefficient. Note that Blowfish may also be used when older versions of OpenSSL are in use, and for backwards compatibility with older versions. -The keys are generated using "openssl rand", and a 1k file of key material is stored in /etc/box/bbackupd. The configuration scripts make this readable only by root. +The keys are generated using "openssl rand", and a 1k file of key +material is stored in /etc/boxbackup/bbackupd. The configuration scripts make this readable only by root. Code for review: BackupClientCryptoKeys_Setup() in lib/backupclient/BackupClientCryptoKeys.cpp --- boxbackup-0.10/notes/lib_raidfile.txt +++ boxbackup-0.10/notes/lib_raidfile.txt @@ -11,7 +11,8 @@ SUBTITLE Controller -The raid disc sets are managed by RaidFileController. This reads the configuration file, /etc/box/raidfile.conf, and then stores the sets of discs for use by the other classes. +The raid disc sets are managed by RaidFileController. This reads the +configuration file, /etc/boxbackup/raidfile.conf, and then stores the sets of discs for use by the other classes. In the code, files are referenced using an integer set number, and a filename within that set. For example, (0, "dir/subdir/filename.ext"). The RAID file controller turns this into actual physcial filenames transparently.