diff options
author | Reinhard Tartler <siretart@tauware.de> | 2010-11-09 17:28:58 +0100 |
---|---|---|
committer | Reinhard Tartler <siretart@tauware.de> | 2010-11-09 17:28:58 +0100 |
commit | 8a937bd354001a190dbe66538aacb353e7c99341 (patch) | |
tree | 9db021722d1743482e76f93d00fb97bed32a3ea7 /contrib | |
parent | b591c86a418e8d5a0d1c1afd319d9acdad6fd4e3 (diff) |
Import upstream version 0.11~rc8~r2714
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/cygwin/README.txt | 30 | ||||
-rwxr-xr-x | contrib/cygwin/install-cygwin-service.pl.in | 112 | ||||
-rwxr-xr-x | contrib/cygwin/remove-cygwin-service.sh | 14 | ||||
-rw-r--r-- | contrib/rpm/boxbackup.spec | 40 |
4 files changed, 18 insertions, 178 deletions
diff --git a/contrib/cygwin/README.txt b/contrib/cygwin/README.txt deleted file mode 100644 index 83f32fd9..00000000 --- a/contrib/cygwin/README.txt +++ /dev/null @@ -1,30 +0,0 @@ - Making boxbackup run as a Windows Service - -For most installations (with the default locations for config files, -etc.) running the install-cygwin-service.pl script will complete the -installation painlessly, and you will have a running bbackupd after -completing the installation, and whenever you reboot. - -Simply run the script: - -perl install-cygwin-service.pl - -The service can be monitored in the Windows Service Manager. It is named -boxbackup. - -For non-standard configurations, there are command-line options to point -the script to the bbackupd.conf config file, and the bbackupd.exe -executable: - -perl install-cygwin-service.pl [-c <path-to-bbackupd-config-file>] [-e -<path-to-bbackupd-executable-file>] - - - Removing the Service - -If you decide not to run backups on a machine anymore, simply remove the -service by running: - -sh remove-cygwin-service.sh - - diff --git a/contrib/cygwin/install-cygwin-service.pl.in b/contrib/cygwin/install-cygwin-service.pl.in deleted file mode 100755 index a580e99c..00000000 --- a/contrib/cygwin/install-cygwin-service.pl.in +++ /dev/null @@ -1,112 +0,0 @@ -#!@PERL@ -w - - -# Contributed to the boxbackup project by Per Reedtz Thomsen. pthomsen@reedtz.com - -# This script reads the config file for boxbackup, and changes the mode -# of the directory named by 'DataDirectory' and any files there. Also, -# the files pointed to by the 'CommandSocket' and 'PidFile' configuration -# parameters will be chmod'ed to be read-write by all. -# The Windows services are created and started using the 'cygrunsrv' utility. - -# Date Who Comments -# 20041005 pthomsen@reedtz.com Created -# 20041020 pthomsen@reedtz.com Switched to using Getopt::Std for cmd-line things. - -use strict; - -use Getopt::Std; -getopt('ce'); -our ($opt_c, $opt_e); -# Figure out the config file to use. Default is /etc/box/bbackupd.conf -my $confFile = (defined($opt_c) ? $opt_c : "/etc/box/bbackupd.conf"); -# Figure out the bbaackupd executable to use. Default is /usr/local/bin/bbackupd.exe -my $exeFile = (defined($opt_e) ? $opt_e : "/usr/local/bin/bbackupd.exe"); - -die "File $confFile does not exist. Please provide the full path to the bbackupd configuration file.\n" if !(-f $confFile); -die "Can't read $confFile. Permission denied. Please chmod the file so I can read it.\n" if !(-r $confFile); -die "File $exeFile does not exist. Please provide the full path to the bbackupd.exe file.\n" if !(-f $exeFile); -die "File $exeFile is not executable. Please provide the full path to the correct bbackupd.exe file.\n" if !(-x $exeFile); - -# print "Config: $confFile\n"; - -my $dataDir; -my $cmdSocket; -my $pidFile; - -open (CONFIG, "<$confFile") or die "Can't open $confFile: $!\n"; - -# Read the confgiguration file, and pull the DataDirectory, CommandSocket, and PidFile parameters. -while (<CONFIG>) -{ - - if (/^\s*DataDirectory\s*=\s*([^\n\s]+)\s*\n/) - { - $dataDir = $1; - next; - } - - if (/^\s*CommandSocket\s*=\s*([^\n\s]+)\s*\n/) - { - $cmdSocket = $1; - next; - } - if (/^\s*PidFile\s*=\s*([^\n\s]+)\s*\n/) - { - $pidFile = $1; - next; - } -} - -# check that we got all the parameters from the file. If not, die. -if ((!defined($dataDir)) || (!defined($cmdSocket)) || (!defined($pidFile))) -{ - die "Could not read config parameters from $confFile. Values retrieved:\n\tDataDirectory = $dataDir\n\tCommandSocket = $cmdSocket\n\tPidFile = $pidFile\n"; -} - - -print "Parameters retrieved from $confFile. Values:\n\tDataDirectory = $dataDir\n\tCommandSocket = $cmdSocket\n\tPidFile = $pidFile\n"; -print "chmod..."; -# change the mode of the files/dirs retrieved. -chmod(0777, $dataDir) or die "Can't chmod $dataDir: $!\n"; -chmod(0666, "$dataDir/*") or die "Can't chmod $dataDir/*: $!\n"; -chmod(0666, $pidFile) or die "Can't chmod $pidFile: $!\n"; -chmod(0755, $cmdSocket) or die "Can't chmod $cmdSocket: $!\n"; -print " Done.\n"; - -# Now install the service using cygrunsrv. -# Details: -# -I <svc_name> Install a service. svc_name is the name under which the -# service will appear in the Windows Service Manager -# -p <path_to_exe> Path to the executable. -# -a <options> Command line options to the executable. -# -f <description> Description of the service. -# -o Attempt clean exit of service during system shutdown - -print "Installing boxbackup service..."; -my $sysCmd = "cygrunsrv.exe -I boxbackup -p " . $exeFile; -$sysCmd .= " -a \"" . $confFile . " SINGLEPROCESS\""; -$sysCmd .= " -o -f \"Online Backup System by Ben Summers\""; -print "$sysCmd\n"; -my $output = qx($sysCmd); -die "cygrunsrv failed to install service. Error Message: $output\n" if($output ne ""); -print " Done.\n"; - - -# Start the service -# Details: -# -S <svc_name> Start a service. svc_name is the name of the (installed) -# service to start. - -print "Starting boxbackup service..."; -$sysCmd = "cygrunsrv.exe -S boxbackup"; -print "$sysCmd\n"; -$output = qx($sysCmd); -die "cygrunsrv failed to start service. Error Message: $output\n" if($output ne ""); -print " Done.\n"; - -print "\n\nService Installation complete. To test, reboot your machine, and make sure that\n"; -print "the boxbackup service is running. A good way to make sure, is to check that the account number\n"; -print "from this machine is connecting to the bbstored server. Check the bbstored logs for more info.\n\n"; - - diff --git a/contrib/cygwin/remove-cygwin-service.sh b/contrib/cygwin/remove-cygwin-service.sh deleted file mode 100755 index e766333d..00000000 --- a/contrib/cygwin/remove-cygwin-service.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash - -# Contributed to the boxbackup project by Per Reedtz Thomsen. pthomsen@reedtz.com - -# This script removes the 'boxbackup' service from the Windows service manager -# using the cygrunsrv utility. - -# Date Who Comments -# 20041005 pthomsen@reedtz.com Created - -cygrunsrv -R boxbackup - -echo "Service \"boxbackup\" removed." - diff --git a/contrib/rpm/boxbackup.spec b/contrib/rpm/boxbackup.spec index 9c494159..e782a6c3 100644 --- a/contrib/rpm/boxbackup.spec +++ b/contrib/rpm/boxbackup.spec @@ -25,18 +25,18 @@ %if %{is_suse} %define init_dir %{_sysconfdir}/init.d -%define dist suse +%define distribution suse %define rc_start rc %else %define init_dir %{_sysconfdir}/rc.d/init.d -%define dist redhat +%define distribution redhat %define rc_start "service " %endif Summary: An automatic on-line backup system for UNIX. Name: boxbackup Version: ###DISTRIBUTION-VERSION-NUMBER### -Release: 1 +Release: 1%{?dist} License: BSD Group: Applications/Archiving Packager: boxbackup-dev@boxbackup.org @@ -104,23 +104,16 @@ mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/box/bbackupd mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/box/bbstored mkdir -p $RPM_BUILD_ROOT%{_var}/lib/box -install -m 644 BUGS.txt \ - $RPM_BUILD_ROOT%{_docdir}/%{ident} -install -m 644 VERSION.txt \ - $RPM_BUILD_ROOT%{_docdir}/%{ident} -install -m 644 ExceptionCodes.txt \ - $RPM_BUILD_ROOT%{_docdir}/%{ident} -install -m 644 LICENSE.txt \ - $RPM_BUILD_ROOT%{_docdir}/%{ident} - -install -m 644 %{distribution_dir}CONTACT.txt \ - $RPM_BUILD_ROOT%{_docdir}/%{ident} -install -m 644 %{distribution_dir}DOCUMENTATION.txt \ - $RPM_BUILD_ROOT%{_docdir}/%{ident} -install -m 644 %{distribution_dir}LINUX.txt \ - $RPM_BUILD_ROOT%{_docdir}/%{ident} -install -m 644 %{distribution_dir}THANKS.txt \ - $RPM_BUILD_ROOT%{_docdir}/%{ident} +install -m 644 -t $RPM_BUILD_ROOT%{_docdir}/%{ident} \ + BUGS.txt \ + VERSION.txt \ + ExceptionCodes.txt \ + LICENSE-GPL.txt \ + LICENSE-DUAL.txt \ + %{distribution_dir}CONTACT.txt \ + %{distribution_dir}DOCUMENTATION.txt \ + %{distribution_dir}LINUX.txt \ + %{distribution_dir}THANKS.txt install -m 644 contrib/bbreporter/LICENSE \ $RPM_BUILD_ROOT%{_docdir}/%{ident}/bbreporter @@ -129,7 +122,7 @@ install -m 755 contrib/bbreporter/bbreporter.py \ # Client touch $RPM_BUILD_ROOT%{_sysconfdir}/box/bbackupd.conf -install -m 755 contrib/%{dist}/bbackupd $RPM_BUILD_ROOT%{init_dir} +install -m 755 contrib/%{distribution}/bbackupd $RPM_BUILD_ROOT%{init_dir} %if %{is_suse} ln -s ../../%{init_dir}/bbackupd $RPM_BUILD_ROOT%{_sbindir}/rcbbackupd %endif @@ -142,7 +135,7 @@ install %{client_dir}/bbackupd-config $RPM_BUILD_ROOT%{_sbindir} # Server touch $RPM_BUILD_ROOT%{_sysconfdir}/box/bbstored.conf touch $RPM_BUILD_ROOT%{_sysconfdir}/box/raidfile.conf -install -m 755 contrib/%{dist}/bbstored $RPM_BUILD_ROOT%{init_dir} +install -m 755 contrib/%{distribution}/bbstored $RPM_BUILD_ROOT%{init_dir} %if %{is_suse} ln -s ../../%{init_dir}/bbstored $RPM_BUILD_ROOT%{_sbindir}/rcbbstored %endif @@ -225,6 +218,9 @@ rm -rf $RPM_BUILD_ROOT %doc %{_docdir}/%{ident}/bbreporter %changelog +* Thu Apr 23 2009 Martin Ebourne <martin@zepler.org> +- Use dist tag in version + * Thu May 29 2008 Martin Ebourne <martin@zepler.org> - Fix paths to bbreporter files |