+++ /dev/null
-#
-# BackupPC-2.1.2pl2.diff: BackupPC patch file generated
-# on Sun Jun 18 19:36:32 2006.
-#
-# This patch file should be applied to a cleanly unpacked BackupPC
-# version 2.1.2. Do not apply any old patch files; each
-# patch file accumulates all previous changes.
-#
-# Example:
-#
-# # fetch BackupPC-2.1.2.tar.gz
-# # fetch BackupPC-2.1.2pl2.diff
-# tar zxvf BackupPC-2.1.2.tar.gz
-# cd BackupPC-2.1.2
-# patch -p0 < ../BackupPC-2.1.2pl2.diff
-# perl configure.pl
-#
-# ChangeLog:
-#
-# - In conf/config.pl, changed --devices to -D in $Conf{RsyncArgs}
-# and $Conf{RsyncRestoreArgs} to fix "fileListReceive failed" and
-# "Can't open .../f%2f for empty output" errors with rsync 2.6.7+.
-# Fix proposed by Justin Pessa and Vincent Ho, and confirmed by
-# Dan Niles.
-#
-# - Added patch from Michael (mna.news) to ignore "file is unchanged"
-# message from tar 1.15.x during incremental backups.
-#
-# - Fixed creation of .rsrc directories in bin/BackupPC_tarExtract
-# when used with xtar on MacOS. Reported by Samuel Bancal and
-# Matthew Radey, who helped with debugging.
-#
-# - Fixed bug in BackupPC_tarExtract for files >8GB in size whose
-# lengths are multiples of 256. Reported by Jamie Myers and
-# Marko Tukiainen, who both helped debugging the problem.
-#
-# - Fixed bug in lib/BackupPC/Xfer/RsyncFileIO.pm that caused
-# incorrected deleted attributes to be set in directories
-# where one of the files had an rsync phase 1 retry during
-# an incremental. Reported by Tony Nelson.
-#
---- bin/BackupPC_tarExtract 2005-09-05 16:21:21.000000000 -0700
-+++ bin/BackupPC_tarExtract 2006-06-18 19:36:31.995945464 -0700
-@@ -58,7 +58,7 @@
- exit(1);
- }
- my $client = $1;
--if ( $ARGV[1] !~ /^([\w\s\.\/\$-]+)$/ ) {
-+if ( $ARGV[1] !~ /^([\w\s.\/$(){}[\]-]+)$/ ) {
- print("$0: bad share name '$ARGV[1]'\n");
- exit(1);
- }
-@@ -101,7 +101,7 @@
- # Copyright 1998 Stephen Zander. All rights reserved.
- #
- my $tar_unpack_header
-- = 'Z100 A8 A8 A8 A12 A12 A8 A1 Z100 A6 A2 Z32 Z32 A8 A8 A155 x12';
-+ = 'Z100 A8 A8 A8 a12 A12 A8 A1 Z100 A6 A2 Z32 Z32 A8 A8 A155 x12';
- my $tar_header_length = 512;
-
- my $BufSize = 1048576; # 1MB or 2^20
-@@ -251,7 +251,7 @@
- $name = $longName if ( defined($longName) );
- $linkname = $longLink if ( defined($longLink) );
- $name =~ s{^\./+}{};
-- $name =~ s{/+$}{};
-+ $name =~ s{/+\.?$}{};
- $name =~ s{//+}{/}g;
- return {
- name => $name,
-@@ -313,7 +313,7 @@
- #
- my($nRead);
- #print("Reading $f->{name}, $f->{size} bytes, type $f->{type}\n");
-- pathCreate($dir, "$OutDir/$ShareName/$f->{mangleName}", $file, $f);
-+ pathCreate($dir, "$OutDir/$ShareName/$f->{mangleName}", $f);
- my $poolWrite = BackupPC::PoolWrite->new($bpc,
- "$OutDir/$ShareName/$f->{mangleName}",
- $f->{size}, $Compress);
-@@ -351,7 +351,7 @@
- # a plain file.
- #
- $f->{size} = length($f->{linkname});
-- pathCreate($dir, "$OutDir/$ShareName/$f->{mangleName}", $file, $f);
-+ pathCreate($dir, "$OutDir/$ShareName/$f->{mangleName}", $f);
- my $poolWrite = BackupPC::PoolWrite->new($bpc,
- "$OutDir/$ShareName/$f->{mangleName}",
- $f->{size}, $Compress);
-@@ -369,7 +369,7 @@
- # contents.
- #
- $f->{size} = length($f->{linkname});
-- pathCreate($dir, "$OutDir/$ShareName/$f->{mangleName}", $file, $f);
-+ pathCreate($dir, "$OutDir/$ShareName/$f->{mangleName}", $f);
- my $poolWrite = BackupPC::PoolWrite->new($bpc,
- "$OutDir/$ShareName/$f->{mangleName}",
- $f->{size}, $Compress);
-@@ -393,7 +393,7 @@
- } else {
- $data = "$f->{devmajor},$f->{devminor}";
- }
-- pathCreate($dir, "$OutDir/$ShareName/$f->{mangleName}", $file, $f);
-+ pathCreate($dir, "$OutDir/$ShareName/$f->{mangleName}", $f);
- my $poolWrite = BackupPC::PoolWrite->new($bpc,
- "$OutDir/$ShareName/$f->{mangleName}",
- length($data), $Compress);
-@@ -487,17 +487,21 @@
- #
- sub pathCreate
- {
-- my($dir, $fullPath, $file, $f) = @_;
-+ my($dir, $fullPath, $f) = @_;
-
- #
- # Get parent directory of each of $dir and $fullPath
- #
-- $dir =~ s{/[^/]*$}{};
-+ # print("pathCreate: dir = $dir, fullPath = $fullPath\n");
-+ $dir =~ s{/([^/]*)$}{};
-+ my $file = $bpc->fileNameUnmangle($1);
- $fullPath =~ s{/[^/]*$}{};
-- return if ( -d $fullPath );
-+ return if ( -d $fullPath || $file eq "" );
-+ unlink($fullPath) if ( -e $fullPath );
- mkpath($fullPath, 0, 0777);
- $Attrib{$dir} = BackupPC::Attrib->new({ compress => $Compress })
- if ( !defined($Attrib{$dir}) );
-+ # print("pathCreate: adding file = $file to dir = $dir\n");
- $Attrib{$dir}->set($file, {
- type => BPC_FTYPE_DIR,
- mode => 0755,
---- lib/BackupPC/Lib.pm 2005-09-05 16:21:21.000000000 -0700
-+++ lib/BackupPC/Lib.pm 2006-06-18 19:36:32.035939384 -0700
-@@ -59,7 +59,7 @@
- TopDir => $topDir || '__TOPDIR__',
- BinDir => $installDir || '__INSTALLDIR__',
- LibDir => $installDir || '__INSTALLDIR__',
-- Version => '2.1.2',
-+ Version => '2.1.2pl2',
- BackupFields => [qw(
- num type startTime endTime
- nFiles size nFilesExist sizeExist nFilesNew sizeNew
---- lib/BackupPC/Xfer/RsyncFileIO.pm 2005-09-05 16:21:21.000000000 -0700
-+++ lib/BackupPC/Xfer/RsyncFileIO.pm 2006-06-18 19:36:32.120926464 -0700
-@@ -405,6 +405,11 @@
- my($fio, $d) = @_;
- my($poolWrite);
-
-+ #
-+ # Don't write attributes on 2nd phase - they're already
-+ # taken care of during the first phase.
-+ #
-+ return if ( $fio->{phase} > 0 );
- if ( !defined($d) ) {
- #
- # flush all entries (in reverse order)
-@@ -932,6 +937,7 @@
-
- close($fio->{rxInFd}) if ( defined($fio->{rxInFd}) );
- unlink("$fio->{outDirSh}RStmp") if ( -f "$fio->{outDirSh}RStmp" );
-+ $fio->{phase} = $phase;
-
- #
- # Check the final md4 digest
---- lib/BackupPC/Xfer/Tar.pm 2005-09-05 16:21:21.000000000 -0700
-+++ lib/BackupPC/Xfer/Tar.pm 2006-06-18 19:36:32.110927984 -0700
-@@ -221,8 +221,13 @@
- $t->{XferLOG}->write(\"$_\n") if ( $t->{logLevel} >= 2 );
- $t->{fileCnt}++;
- } else {
-- $t->{XferLOG}->write(\"$_\n") if ( $t->{logLevel} >= 0 );
-- $t->{xferErrCnt}++;
-+ #
-+ # Ignore annoying log message on incremental for tar 1.15.x
-+ #
-+ if ( !/: file is unchanged; not dumped$/ ) {
-+ $t->{XferLOG}->write(\"$_\n") if ( $t->{logLevel} >= 0 );
-+ $t->{xferErrCnt}++;
-+ }
- #
- # If tar encounters a minor error, it will exit with a non-zero
- # status. We still consider that ok. Remember if tar prints
---- conf/config.pl 2005-09-05 16:21:22.000000000 -0700
-+++ conf/config.pl 2006-06-18 19:36:31.968949568 -0700
-@@ -1052,7 +1052,7 @@
- '--perms',
- '--owner',
- '--group',
-- '--devices',
-+ '-D',
- '--links',
- '--times',
- '--block-size=2048',
-@@ -1086,7 +1086,7 @@
- '--perms',
- '--owner',
- '--group',
-- '--devices',
-+ '-D',
- '--links',
- '--times',
- '--block-size=2048',
+++ /dev/null
-# /etc/conf.d/apache2: config file for /etc/init.d/apache2
-
-# When you install a module it is easy to activate or deactivate the modules
-# and other features of apache using the APACHE2_OPTS line. Every module should
-# install a configuration in /etc/apache2/modules.d. In that file will have an
-# <IfDefine NNN> directive where NNN is the option to enable that module.
-#
-# Here are the options available in the default configuration:
-#
-# AUTH_DIGEST Enables mod_auth_digest
-# AUTHNZ_LDAP Enables authentication through mod_ldap (available if USE=ldap)
-# CACHE Enables mod_cache
-# DAV Enables mod_dav
-# ERRORDOCS Enables default error documents for many languages.
-# INFO Enables mod_info, a useful module for debugging
-# LANGUAGE Enables content-negotiation based on language and charset.
-# LDAP Enables mod_ldap (available if USE=ldap)
-# MANUAL Enables /manual/ to be the apache manual (available if USE=docs)
-# MEM_CACHE Enables default configuration mod_mem_cache
-# PROXY Enables mod_proxy
-# SSL Enables SSL (available if USE=ssl)
-# SUEXEC Enables running CGI scripts (in USERDIR) through suexec.
-# USERDIR Enables /~username mapping to /home/username/public_html
-#
-#
-# The following two options provide the default virtual host for the HTTP and
-# HTTPS protocol. YOU NEED TO ENABLE AT LEAST ONE OF THEM, otherwise apache
-# will not listen for incomming connections on the approriate port.
-#
-# DEFAULT_VHOST Enables name-based virtual hosts, with the default
-# virtual host being in /var/www/localhost/htdocs
-# SSL_DEFAULT_VHOST Enables default vhost for SSL (you should enable this
-# when you enable SSL)
-#
-APACHE2_OPTS="-D LANGUAGE -D PERL -D BACKUPPC_VHOST"
-
-# Extended options for advanced uses of Apache ONLY
-# You don't need to edit these unless you are doing crazy Apache stuff
-# As not having them set correctly, or feeding in an incorrect configuration
-# via them will result in Apache failing to start
-# YOU HAVE BEEN WARNED.
-
-# PID file
-PIDFILE=/var/run/apache-backuppc.pid
-
-# timeout for startup/shutdown checks
-#TIMEOUT=10
-
-# ServerRoot setting
-SERVERROOT=/usr/lib/apache2
-
-# Configuration file location
-# - If this does NOT start with a '/', then it is treated relative to
-# $SERVERROOT by Apache
-CONFIGFILE=/etc/BackupPC/httpd.conf
-
-# Location to log startup errors to
-# They are normally dumped to your terminal.
-#STARTUPERRORLOG="/var/log/apache2/startuperror.log"
-
-# A command that outputs a formatted text version of the HTML at the URL
-# of the command line. Designed for lynx, however other programs may work.
-#LYNX="lynx -dump"
-
-# The URL to your server's mod_status status page.
-# Required for status and fullstatus
-#STATUSURL="http://localhost/server-status"
-
-# Method to use when reloading the server
-# Valid options are 'restart' and 'graceful'
-# See http://httpd.apache.org/docs/2.2/stopping.html for information on
-# what they do and how they differ.
-#RELOAD_TYPE="graceful"
+++ /dev/null
-#!/sbin/runscript
-# Copyright 1999-2011 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-opts="configdump configtest fullstatus graceful gracefulstop modules reload virtualhosts"
-
-depend() {
- need net
- use mysql dns logger netmount postgresql
- after sshd
-}
-
-configtest() {
- ebegin "Checking ${SVCNAME} configuration"
- checkconfig
- eend $?
-}
-
-checkconfd() {
- PIDFILE="${PIDFILE:-/var/run/apache2-backuppc.pid}"
- TIMEOUT=${TIMEOUT:-10}
-
- SERVERROOT="${SERVERROOT:-/usr/lib/apache2}"
- if [ ! -d ${SERVERROOT} ]; then
- eerror "SERVERROOT does not exist: ${SERVERROOT}"
- return 1
- fi
-
- CONFIGFILE="${CONFIGFILE:-/etc/BackupPC/httpd.conf}"
- [ "${CONFIGFILE#/}" = "${CONFIGFILE}" ] && CONFIGFILE="${SERVERROOT}/${CONFIGFILE}"
- if [ ! -r "${CONFIGFILE}" ]; then
- eerror "Unable to read configuration file: ${CONFIGFILE}"
- return 1
- fi
-
- APACHE2_OPTS="${APACHE2_OPTS} -d ${SERVERROOT}"
- APACHE2_OPTS="${APACHE2_OPTS} -f ${CONFIGFILE}"
- [ -n "${STARTUPERRORLOG}" ] && APACHE2_OPTS="${APACHE2_OPTS} -E ${STARTUPERRORLOG}"
-
- APACHE2="/usr/sbin/apache2"
-}
-
-checkconfig() {
- checkconfd || return 1
-
- ${APACHE2} ${APACHE2_OPTS} -t 1>/dev/null 2>&1
- ret=$?
- if [ $ret -ne 0 ]; then
- eerror "${SVCNAME} has detected a syntax error in your configuration files:"
- ${APACHE2} ${APACHE2_OPTS} -t
- fi
-
- return $ret
-}
-
-start() {
- checkconfig || return 1
-
- [ -f /var/log/apache2/ssl_scache ] && rm /var/log/apache2/ssl_scache
-
- ebegin "Starting ${SVCNAME}"
- ${APACHE2} ${APACHE2_OPTS} -k start
-
- let i=0
- while [ ! -e "${PIDFILE}" ] && [ $i -lt ${TIMEOUT} ]; do
- sleep 1 && i=$(expr $i + 1)
- done
-
- test $i -le ${TIMEOUT}
- eend $?
-}
-
-stop() {
- checkconfd || return 1
-
- ebegin "Stopping ${SVCNAME}"
- ${APACHE2} ${APACHE2_OPTS} -k stop
-
- let i=0
- while pidof "${APACHE2}" >/dev/null && [ $i -lt ${TIMEOUT} ]; do
- sleep 1 && i=$(expr $i + 1)
- done
-
- test $i -le ${TIMEOUT}
- eend $?
-}
-
-reload() {
- RELOAD_TYPE="${RELOAD_TYPE:-graceful}"
-
- checkconfig || return 1
- service_started "${SVCNAME}" || return
-
- if [ "${RELOAD_TYPE}" = "restart" ]; then
- ebegin "Restarting ${SVCNAME}"
- ${APACHE2} ${APACHE2_OPTS} -k restart
- eend $?
- elif [ "${RELOAD_TYPE}" = "graceful" ]; then
- ebegin "Gracefully restarting ${SVCNAME}"
- ${APACHE2} ${APACHE2_OPTS} -k graceful
- eend $?
- else
- eerror "${RELOAD_TYPE} is not a valid RELOAD_TYPE. Please edit /etc/conf.d/${SVCNAME}"
- fi
-}
-
-graceful() {
- checkconfig || return 1
- service_started "${SVCNAME}" || return
- ebegin "Gracefully restarting ${SVCNAME}"
- ${APACHE2} ${APACHE2_OPTS} -k graceful
- eend $?
-}
-
-gracefulstop() {
- checkconfig || return 1
-
- # zap!
- if service_started "${SVCNAME}"; then
- mark_service_stopped "${SVCNAME}"
- fi
-
- ebegin "Gracefully stopping ${SVCNAME}"
- ${APACHE2} ${APACHE2_OPTS} -k graceful-stop
- eend $?
-}
-
-modules() {
- checkconfig || return 1
-
- ${APACHE2} ${APACHE2_OPTS} -M 2>&1
-}
-
-fullstatus() {
- LYNX="${LYNX:-lynx -dump}"
- STATUSURL="${STATUSURL:-http://localhost/server-status}"
-
- if ! service_started "${SVCNAME}"; then
- eerror "${SVCNAME} not started"
- elif ! type -p ${LYNX} 2>&1 >/dev/null; then
- eerror "lynx not found! you need to emerge www-client/lynx"
- else
- ${LYNX} ${STATUSURL}
- fi
-}
-
-virtualhosts() {
- checkconfd || return 1
- ${APACHE2} ${APACHE2_OPTS} -S
-}
-
-configdump() {
- LYNX="${LYNX:-lynx -dump}"
- INFOURL="${INFOURL:-http://localhost/server-info}"
-
- checkconfd || return 1
-
- if ! service_started "${SVCNAME}"; then
- eerror "${SVCNAME} not started"
- elif ! type -p ${LYNX} 2>&1 >/dev/null; then
- eerror "lynx not found! you need to emerge www-client/lynx"
- else
- echo "${APACHE2} started with '${APACHE2_OPTS}'"
- for i in config server list; do
- ${LYNX} "${INFOURL}/?${i}" | sed '/Apache Server Information/d;/^[[:space:]]\+[_]\+$/Q'
- done
- fi
-}
-
-# vim: ts=4 filetype=gentoo-init-d