From 432af7f673072011ecb7070afef9e66647758540 Mon Sep 17 00:00:00 2001 From: Patrick Lauer Date: Mon, 29 Aug 2011 10:41:07 +0000 Subject: Bump for #287133, ebuild from the portage-backup overlay. Thanks to Lenno Nagel. (Portage version: 2.2.0_alpha51/cvs/Linux x86_64) --- app-backup/backuppc/ChangeLog | 16 +- app-backup/backuppc/backuppc-3.2.1.ebuild | 225 ++++++ .../backuppc/files/3.2.0/01-fix-configure.pl.patch | 30 + .../files/3.2.0/02-fix-config.pl-formatting.patch | 801 +++++++++++++++++++++ .../3.2.0/03-reasonable-config.pl-defaults.patch | 47 ++ .../files/3.2.0/04-add-docdir-marker.patch | 11 + app-backup/backuppc/files/3.2.0/05-nicelevel.patch | 18 + app-backup/backuppc/files/apache2-backuppc.conf | 73 ++ app-backup/backuppc/files/apache2-backuppc.init | 170 +++++ app-backup/backuppc/files/httpd.conf | 332 +++++++++ 10 files changed, 1721 insertions(+), 2 deletions(-) create mode 100644 app-backup/backuppc/backuppc-3.2.1.ebuild create mode 100644 app-backup/backuppc/files/3.2.0/01-fix-configure.pl.patch create mode 100644 app-backup/backuppc/files/3.2.0/02-fix-config.pl-formatting.patch create mode 100644 app-backup/backuppc/files/3.2.0/03-reasonable-config.pl-defaults.patch create mode 100644 app-backup/backuppc/files/3.2.0/04-add-docdir-marker.patch create mode 100644 app-backup/backuppc/files/3.2.0/05-nicelevel.patch create mode 100644 app-backup/backuppc/files/apache2-backuppc.conf create mode 100644 app-backup/backuppc/files/apache2-backuppc.init create mode 100644 app-backup/backuppc/files/httpd.conf (limited to 'app-backup/backuppc') diff --git a/app-backup/backuppc/ChangeLog b/app-backup/backuppc/ChangeLog index 2c9345033284..e677d524f07b 100644 --- a/app-backup/backuppc/ChangeLog +++ b/app-backup/backuppc/ChangeLog @@ -1,6 +1,18 @@ # ChangeLog for app-backup/backuppc -# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-backup/backuppc/ChangeLog,v 1.8 2009/10/12 17:17:02 halcy0n Exp $ +# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/app-backup/backuppc/ChangeLog,v 1.9 2011/08/29 10:41:07 patrick Exp $ + +*backuppc-3.2.1 (29 Aug 2011) + + 29 Aug 2011; Patrick Lauer + +files/3.2.0/01-fix-configure.pl.patch, + +files/3.2.0/02-fix-config.pl-formatting.patch, + +files/3.2.0/03-reasonable-config.pl-defaults.patch, + +files/3.2.0/04-add-docdir-marker.patch, +files/3.2.0/05-nicelevel.patch, + +files/apache2-backuppc.conf, +files/apache2-backuppc.init, + +backuppc-3.2.1.ebuild, +files/httpd.conf: + Bump for #287133, ebuild from the portage-backup overlay. Thanks to Lenno + Nagel. 12 Oct 2009; Mark Loeser backuppc-2.1.2-r1.ebuild: QA fixes; unquoted variables diff --git a/app-backup/backuppc/backuppc-3.2.1.ebuild b/app-backup/backuppc/backuppc-3.2.1.ebuild new file mode 100644 index 000000000000..363d83c6b5e4 --- /dev/null +++ b/app-backup/backuppc/backuppc-3.2.1.ebuild @@ -0,0 +1,225 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-backup/backuppc/backuppc-3.2.1.ebuild,v 1.1 2011/08/29 10:41:07 patrick Exp $ + +EAPI="2" + +inherit eutils webapp + +MY_P="BackupPC-${PV}" + +DESCRIPTION="A high-performance system for backing up computers to a server's disk." +HOMEPAGE="http://backuppc.sourceforge.net/" +SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz" + +LICENSE="GPL-2" +KEYWORDS="~amd64 ~x86" + +IUSE="rss samba" + +DEPEND="dev-lang/perl + app-admin/apache-tools + app-admin/makepasswd" +RDEPEND="${DEPEND} + perl-core/IO-Compress + dev-perl/Archive-Zip + dev-perl/libwww-perl + >=app-arch/tar-1.13.20 + app-arch/par2cmdline + app-arch/gzip + app-arch/bzip2 + virtual/mta + www-apache/mod_perl + www-servers/apache + net-misc/rsync + >=dev-perl/File-RsyncP-0.68 + rss? ( dev-perl/XML-RSS ) + samba? ( net-fs/samba )" + +WEBAPP_MANUAL_SLOT="yes" +SLOT="0" + +S=${WORKDIR}/${MY_P} + +CONFDIR="/etc/BackupPC" +DATADIR="/var/lib/backuppc" +LOGDIR="/var/log/BackupPC" + +pkg_setup() { + webapp_pkg_setup + enewgroup backuppc + enewuser backuppc -1 /bin/bash /var/lib/backuppc backuppc +} + +src_unpack() { + unpack ${A} + cd "${S}" +} + +src_prepare() { + epatch "${FILESDIR}/3.2.0/01-fix-configure.pl.patch" + epatch "${FILESDIR}/3.2.0/02-fix-config.pl-formatting.patch" + epatch "${FILESDIR}/3.2.0/03-reasonable-config.pl-defaults.patch" + + # Fix the documentation location in the CGI interface + epatch "${FILESDIR}/3.2.0/04-add-docdir-marker.patch" + sed -i "s+__DOCDIR__+/usr/share/doc/${PF}+" "lib/BackupPC/CGI/View.pm" + + epatch "${FILESDIR}/3.2.0/05-nicelevel.patch" +} + +src_test() { + true +} + +src_install() { + webapp_src_preinst + + local myconf + myconf="" + if use samba ; then + myconf="--bin-path smbclient=$(type -p smbclient)" + myconf="${myconf} --bin-path nmblookup=$(type -p nmblookup)" + fi + + ./configure.pl \ + --batch \ + --bin-path perl=$(type -p perl) \ + --bin-path tar=$(type -p tar) \ + --bin-path rsync=$(type -p rsync) \ + --bin-path ping=$(type -p ping) \ + --bin-path df=$(type -p df) \ + --bin-path ssh=$(type -p ssh) \ + --bin-path sendmail=$(type -p sendmail) \ + --bin-path hostname=$(type -p hostname) \ + --bin-path gzip=$(type -p gzip) \ + --bin-path bzip2=$(type -p bzip2) \ + --config-dir ${CONFDIR} \ + --install-dir /usr \ + --data-dir ${DATADIR} \ + --hostname $(hostname) \ + --uid-ignore \ + --dest-dir "${D%/}" \ + --html-dir ${MY_HTDOCSDIR}/image \ + --html-dir-url /image \ + --cgi-dir ${MY_HTDOCSDIR} \ + --fhs \ + ${myconf} || die "failed the configure.pl script" + + ebegin "Installing documentation" + + pod2man \ + --section=8 \ + --center="BackupPC manual" \ + "${S}"/doc/BackupPC.pod backuppc.8 || die "failed to generate man page" + + doman backuppc.8 + + # Place the documentation in the correct location + dodoc "${D}/usr/doc/BackupPC.html" + dodoc "${D}/usr/doc/BackupPC.pod" + rm -rf "${D}/usr/doc" + + eend 0 + + # Setup directories + dodir ${CONFDIR}/pc + + keepdir ${CONFDIR} + keepdir ${CONFDIR}/pc + keepdir ${DATADIR}/{trash,pool,pc,cpool} + keepdir ${LOGDIR} + + ebegin "Setting up init.d/conf.d scripts" + newinitd "${S}"/init.d/gentoo-backuppc backuppc + newconfd "${S}"/init.d/gentoo-backuppc.conf backuppc + eend 0 + + ebegin "Setting up an apache instance for backuppc" + + cp "${FILESDIR}/apache2-backuppc."{conf,init} "${WORKDIR}/" + cp "${FILESDIR}/httpd.conf" "${WORKDIR}/httpd.conf" + sed -i -e "s+HTDOCSDIR+${MY_HTDOCSDIR}+g" "${WORKDIR}/httpd.conf" + sed -i -e "s+AUTHFILE+${CONFDIR}/users.htpasswd+g" "${WORKDIR}/httpd.conf" + + moduledir="/usr/lib/apache2/modules" + + # Check if the Apache ServerRoot is real. + # This is sometimes broken on older amd64 systems. + # In this case we just patch our config file appropriately. + if [[ ! -d "/usr/lib/apache2" ]]; then + if [[ -d "/usr/lib64/apache2" ]]; then + sed -i -e "s+/usr/lib/apache2+/usr/lib64/apache2+g" "${WORKDIR}/httpd.conf" + sed -i -e "s+/usr/lib/apache2+/usr/lib64/apache2+g" "${WORKDIR}/apache2-backuppc.conf" + moduledir="/usr/lib64/apache2/modules" + fi + fi + + # Check if we're using mod_cgid instead of mod_cgi + # This happens if you install apache with USE="threads" + if [[ -f "${moduledir}/mod_cgid.so" ]]; then + sed -i -e "s+mod_cgi+mod_cgid+g" "${WORKDIR}/httpd.conf" + sed -i -e "s+cgi_module+cgid_module+g" "${WORKDIR}/httpd.conf" + fi + + # Install conf.d/init.d files for apache2-backuppc + if [ -e /etc/init.d/apache2 ]; then + newconfd "${WORKDIR}/apache2-backuppc.conf" apache2-backuppc + newinitd /etc/init.d/apache2 apache2-backuppc + else + newconfd "${WORKDIR}/apache2-backuppc.conf" apache2-backuppc + newinitd "${WORKDIR}/apache2-backuppc.init" apache2-backuppc + fi + + insopts -m 0644 + insinto ${CONFDIR} + doins "${WORKDIR}/httpd.conf" + + eend $? + + webapp_src_install || die "webapp_src_install" + + # Make sure that the ownership is correct + chown -R backuppc:backuppc "${D}${CONFDIR}" + chown -R backuppc:backuppc "${D}${DATADIR}" + chown -R backuppc:backuppc "${D}${LOGDIR}" +} + +pkg_postinst() { + # This is disabled since BackupPC doesn't need it + # webapp_pkg_postinst + + elog "Installation finished, now may now start using BackupPC." + elog "" + elog "- Read the documentation in /usr/share/doc/${PF}/BackupPC.html" + elog " Please pay special attention to the security section." + elog "" + elog "- You can launch backuppc and it's apache web interface by running:" + elog " # /etc/init.d/backuppc start" + elog " # /etc/init.d/apache2-backuppc start" + + if [[ ! -e /etc/runlevels/default/backuppc ]]; then + elog "" + elog "- You also might want to add these scripts to your default runlevel:" + elog " # rc-update add backuppc default" + elog " # rc-update add apache2-backuppc default" + fi + + # Generate a new password if there's no auth file + if [[ ! -f "${CONFDIR}/users.htpasswd" ]]; then + adminuser="backuppc" + adminpass=$( makepasswd --chars=12 ) + htpasswd -bc "${CONFDIR}/users.htpasswd" $adminuser $adminpass + + elog "" + elog "- Created admin user $adminuser with password $adminpass" + elog " To add new users, run: " + elog " # htpasswd ${CONFDIR}/users.htpasswd newUser" + fi + + if [[ -d "/etc/backuppc" ]]; then + ewarn "" + ewarn "Detected old config directory in /etc/backuppc" + ewarn "Please migrate relevant config files to ${CONFDIR} before starting backuppc" + fi +} diff --git a/app-backup/backuppc/files/3.2.0/01-fix-configure.pl.patch b/app-backup/backuppc/files/3.2.0/01-fix-configure.pl.patch new file mode 100644 index 000000000000..060cf953e7a4 --- /dev/null +++ b/app-backup/backuppc/files/3.2.0/01-fix-configure.pl.patch @@ -0,0 +1,30 @@ +--- configure.pl.orig 2010-07-31 20:52:58.000000000 +0300 ++++ configure.pl 2010-09-03 22:09:46.437788435 +0300 +@@ -158,7 +158,7 @@ + # config file to get all the defaults. + # + my $ConfigPath = ""; +-my $ConfigFileOK = 1; ++my $ConfigFileOK = 0; + while ( 1 ) { + if ( $ConfigFileOK && -f "/etc/BackupPC/config.pl" ) { + $ConfigPath = "/etc/BackupPC/config.pl"; +@@ -213,7 +213,8 @@ + $bpc->{LogDir} = $Conf{LogDir} = "$Conf{TopDir}/log" + if ( $Conf{LogDir} eq '' ); + } +- $bpc->{ConfDir} = $Conf{ConfDir} = $confDir; ++ # Disable this as it's not really neccessary for this ebuild ++ # $bpc->{ConfDir} = $Conf{ConfDir} = $confDir; + my $err = $bpc->ServerConnect($Conf{ServerHost}, $Conf{ServerPort}, 1); + if ( $err eq "" ) { + print <= 1. +@@ -458,7 +482,9 @@ + # $Conf{FullKeepCnt} = 4; + # $Conf{FullKeepCnt} = [4]; + # +-$Conf{FullKeepCnt} = 1; ++$Conf{FullKeepCnt} = [ ++ 1 ++]; + + # + # Very old full backups are removed after $Conf{FullAgeMax} days. However, +@@ -470,7 +496,7 @@ + # full backups to exceed $Conf{FullAgeMax}. + # + $Conf{FullKeepCntMin} = 1; +-$Conf{FullAgeMax} = 90; ++$Conf{FullAgeMax} = 90; + + # + # Number of incremental backups to keep. Must be >= 1. +@@ -487,7 +513,7 @@ + # matter how old they are. + # + $Conf{IncrKeepCntMin} = 1; +-$Conf{IncrAgeMax} = 30; ++$Conf{IncrAgeMax} = 30; + + # + # Level of each incremental. "Level" follows the terminology +@@ -565,7 +591,9 @@ + # meaning each incremental backed up all the files that + # changed since the last full. + # +-$Conf{IncrLevels} = [1]; ++$Conf{IncrLevels} = [ ++ 1 ++]; + + # + # Disable all full and incremental backups. These settings are +@@ -631,7 +659,7 @@ + # The default is off. You can turn this on or off at any + # time without affecting existing backups. + # +-$Conf{IncrFill} = 0; ++$Conf{IncrFill} = '0'; + + # + # Number of restore logs to keep. BackupPC remembers information about +@@ -683,7 +711,7 @@ + # '*' => ['/myFiles', '/important'], # these are other shares + # }; + # +-$Conf{BackupFilesOnly} = undef; ++$Conf{BackupFilesOnly} = {}; + + # + # List of directories or files to exclude from the backup. For Smb, +@@ -739,7 +767,7 @@ + # '*' => ['/junk', '/dont_back_this_up'], # these are for other shares + # }; + # +-$Conf{BackupFilesExclude} = undef; ++$Conf{BackupFilesExclude} = {}; + + # + # PCs that are always or often on the network can be backed up after +@@ -770,7 +798,7 @@ + # to just set $Conf{WakeupSchedule} to a restricted schedule. + # + $Conf{BlackoutBadPingLimit} = 3; +-$Conf{BlackoutGoodCnt} = 7; ++$Conf{BlackoutGoodCnt} = 7; + + # + # One or more blackout periods can be specified. If a client is +@@ -813,11 +841,17 @@ + # Saturday night. + # + $Conf{BlackoutPeriods} = [ +- { +- hourBegin => 7.0, +- hourEnd => 19.5, +- weekDays => [1, 2, 3, 4, 5], +- }, ++ { ++ 'hourEnd' => '19.5', ++ 'weekDays' => [ ++ 1, ++ 2, ++ 3, ++ 4, ++ 5 ++ ], ++ 'hourBegin' => 7 ++ } + ]; + + # +@@ -826,7 +860,7 @@ + # backed up. If you have shares that might be empty (and therefore an + # empty backup is valid) you should set this flag to 0. + # +-$Conf{BackupZeroFilesIsFatal} = 1; ++$Conf{BackupZeroFilesIsFatal} = '1'; + + ########################################################################### + # How to backup a client +@@ -922,7 +956,9 @@ + # + # This setting only matters if $Conf{XferMethod} = 'smb'. + # +-$Conf{SmbShareName} = 'C$'; ++$Conf{SmbShareName} = [ ++ 'C$' ++]; + + # + # Smbclient share user name. This is passed to smbclient's -U argument. +@@ -975,9 +1011,7 @@ + # needs to be a full path and you can't include shell syntax like + # redirection and pipes; put that in a script if you need it. + # +-$Conf{SmbClientFullCmd} = '$smbClientPath \\\\$host\\$shareName' +- . ' $I_option -U $userName -E -N -d 1' +- . ' -c tarmode\\ full -Tc$X_option - $fileList'; ++$Conf{SmbClientFullCmd} = '$smbClientPath \\\\$host\\$shareName $I_option -U $userName -E -N -d 1 -c tarmode\\ full -Tc$X_option - $fileList'; + + # + # Command to run smbclient for an incremental dump. +@@ -989,9 +1023,7 @@ + # needs to be a full path and you can't include shell syntax like + # redirection and pipes; put that in a script if you need it. + # +-$Conf{SmbClientIncrCmd} = '$smbClientPath \\\\$host\\$shareName' +- . ' $I_option -U $userName -E -N -d 1' +- . ' -c tarmode\\ full -TcN$X_option $timeStampFile - $fileList'; ++$Conf{SmbClientIncrCmd} = '$smbClientPath \\\\$host\\$shareName $I_option -U $userName -E -N -d 1 -c tarmode\\ full -TcN$X_option $timeStampFile - $fileList'; + + # + # Command to run smbclient for a restore. +@@ -1007,9 +1039,7 @@ + # needs to be a full path and you can't include shell syntax like + # redirection and pipes; put that in a script if you need it. + # +-$Conf{SmbClientRestoreCmd} = '$smbClientPath \\\\$host\\$shareName' +- . ' $I_option -U $userName -E -N -d 1' +- . ' -c tarmode\\ full -Tx -'; ++$Conf{SmbClientRestoreCmd} = '$smbClientPath \\\\$host\\$shareName $I_option -U $userName -E -N -d 1 -c tarmode\\ full -Tx -'; + + ########################################################################### + # Tar Configuration +@@ -1044,7 +1074,9 @@ + # + # This setting only matters if $Conf{XferMethod} = 'tar'. + # +-$Conf{TarShareName} = '/'; ++$Conf{TarShareName} = [ ++ '/' ++]; + + # + # Full command to run tar on the client. GNU tar is required. You will +@@ -1085,9 +1117,7 @@ + # needs to be a full path and you can't include shell syntax like + # redirection and pipes; put that in a script if you need it. + # +-$Conf{TarClientCmd} = '$sshPath -q -x -n -l root $host' +- . ' env LC_ALL=C $tarPath -c -v -f - -C $shareName+' +- . ' --totals'; ++$Conf{TarClientCmd} = '$sshPath -q -x -n -l root $host env LC_ALL=C $tarPath -c -v -f - -C $shareName+ --totals'; + + # + # Extra tar arguments for full backups. Several variables are substituted at +@@ -1146,9 +1176,7 @@ + # needs to be a full path and you can't include shell syntax like + # redirection and pipes; put that in a script if you need it. + # +-$Conf{TarClientRestoreCmd} = '$sshPath -q -x -l root $host' +- . ' env LC_ALL=C $tarPath -x -p --numeric-owner --same-owner' +- . ' -v -f - -C $shareName+'; ++$Conf{TarClientRestoreCmd} = '$sshPath -q -x -l root $host env LC_ALL=C $tarPath -x -p --numeric-owner --same-owner -v -f - -C $shareName+'; + + # + # Full path for tar on the client. Security caution: normal users should not +@@ -1220,7 +1248,9 @@ + # + # $Conf{RsyncShareName} = ['/', '/var', '/data', '/boot']; + # +-$Conf{RsyncShareName} = '/'; ++$Conf{RsyncShareName} = [ ++ '/' ++]; + + # + # Rsync daemon port on the client, for $Conf{XferMethod} = "rsyncd". +@@ -1249,7 +1279,7 @@ + # connect to an rsyncd on the client that is not password protected. + # Turn off at your own risk. + # +-$Conf{RsyncdAuthRequired} = 1; ++$Conf{RsyncdAuthRequired} = '1'; + + # + # When rsync checksum caching is enabled (by adding the +@@ -1272,35 +1302,23 @@ + # + # This setting has no effect unless checksum caching is turned on. + # +-$Conf{RsyncCsumCacheVerifyProb} = 0.01; ++$Conf{RsyncCsumCacheVerifyProb} = '0.01'; + + # + # Arguments to rsync for backup. Do not edit the first set unless you + # have a thorough understanding of how File::RsyncP works. + # + $Conf{RsyncArgs} = [ +- # +- # Do not edit these! +- # +- '--numeric-ids', +- '--perms', +- '--owner', +- '--group', +- '-D', +- '--links', +- '--hard-links', +- '--times', +- '--block-size=2048', +- '--recursive', +- +- # +- # Rsync >= 2.6.3 supports the --checksum-seed option +- # which allows rsync checksum caching on the server. +- # Uncomment this to enable rsync checksum caching if +- # you have a recent client rsync version and you want +- # to enable checksum caching. +- # +- #'--checksum-seed=32761', ++ '--numeric-ids', ++ '--perms', ++ '--owner', ++ '--group', ++ '-D', ++ '--links', ++ '--hard-links', ++ '--times', ++ '--block-size=2048', ++ '--recursive', + ]; + + # +@@ -1355,34 +1373,18 @@ + # Note: $Conf{RsyncArgsExtra} doesn't apply to $Conf{RsyncRestoreArgs}. + # + $Conf{RsyncRestoreArgs} = [ +- # +- # Do not edit these! +- # +- '--numeric-ids', +- '--perms', +- '--owner', +- '--group', +- '-D', +- '--links', +- '--hard-links', +- '--times', +- '--block-size=2048', +- '--relative', +- '--ignore-times', +- '--recursive', +- +- # +- # Rsync >= 2.6.3 supports the --checksum-seed option +- # which allows rsync checksum caching on the server. +- # Uncomment this to enable rsync checksum caching if +- # you have a recent client rsync version and you want +- # to enable checksum caching. +- # +- #'--checksum-seed=32761', +- +- # +- # Add additional arguments here +- # ++ '--numeric-ids', ++ '--perms', ++ '--owner', ++ '--group', ++ '-D', ++ '--links', ++ '--hard-links', ++ '--times', ++ '--block-size=2048', ++ '--relative', ++ '--ignore-times', ++ '--recursive', + ]; + + ########################################################################### +@@ -1515,7 +1517,7 @@ + # + # Set to 0 to disable this feature. + # +-$Conf{ArchivePar} = 0; ++$Conf{ArchivePar} = '0'; + + # + # Archive Size Split +@@ -1551,9 +1553,7 @@ + # needs to be a full path and you can't include shell syntax like + # redirection and pipes; put that in a script if you need it. + # +-$Conf{ArchiveClientCmd} = '$Installdir/bin/BackupPC_archiveHost' +- . ' $tarCreatePath $splitpath $parpath $host $backupnumber' +- . ' $compression $compext $splitsize $archiveloc $parfile *'; ++$Conf{ArchiveClientCmd} = '$Installdir/bin/BackupPC_archiveHost $tarCreatePath $splitpath $parpath $host $backupnumber $compression $compext $splitsize $archiveloc $parfile *'; + + # + # Full path for ssh. Security caution: normal users should not +@@ -1625,7 +1625,7 @@ + # setting this flag is a great way to verify that the machines have + # their netbios name set correctly before turning on DCHP. + # +-$Conf{FixedIPNetBiosNameCheck} = 0; ++$Conf{FixedIPNetBiosNameCheck} = '0'; + + # + # Full path to the ping command. Security caution: normal users +@@ -1802,13 +1802,13 @@ + # needs to be a full path and you can't include shell syntax like + # redirection and pipes; put that in a script if you need it. + # +-$Conf{DumpPreUserCmd} = undef; +-$Conf{DumpPostUserCmd} = undef; +-$Conf{DumpPreShareCmd} = undef; +-$Conf{DumpPostShareCmd} = undef; +-$Conf{RestorePreUserCmd} = undef; ++$Conf{DumpPreUserCmd} = undef; ++$Conf{DumpPostUserCmd} = undef; ++$Conf{DumpPreShareCmd} = undef; ++$Conf{DumpPostShareCmd} = undef; ++$Conf{RestorePreUserCmd} = undef; + $Conf{RestorePostUserCmd} = undef; +-$Conf{ArchivePreUserCmd} = undef; ++$Conf{ArchivePreUserCmd} = undef; + $Conf{ArchivePostUserCmd} = undef; + + # +@@ -1832,7 +1832,7 @@ + # that snapshots or dumps a database which fails because + # of some database error. + # +-$Conf{UserCmdCheckStatus} = 0; ++$Conf{UserCmdCheckStatus} = '0'; + + # + # Override the client's host name. This allows multiple clients +@@ -1870,7 +1870,7 @@ + # rounded up (ie: 2.5 means a user will never receive email more + # than once every 3 days). + # +-$Conf{EMailNotifyMinDays} = 2.5; ++$Conf{EMailNotifyMinDays} = '2.5'; + + # + # Name to use as the "from" name for email. Depending upon your mail +@@ -1925,7 +1925,7 @@ + # When there have been no backups in this number of days the user + # is sent an email. + # +-$Conf{EMailNotifyOldBackupDays} = 7.0; ++$Conf{EMailNotifyOldBackupDays} = 7; + + # + # This subject and message is sent to a user if their PC has not recently +@@ -1952,7 +1952,7 @@ + # How old the most recent backup of Outlook files has to be before + # notifying user. + # +-$Conf{EMailNotifyOldOutlookDays} = 5.0; ++$Conf{EMailNotifyOldOutlookDays} = 5; + + # + # This subject and message is sent to a user if their Outlook files have +@@ -1980,10 +1980,9 @@ + # Additional email headers. This sets to charset to + # utf8. + # +-$Conf{EMailHeaders} = < "?action=view&type=docs", +- lname => "Documentation", # actually displays $Lang->{Documentation} +- }, +- { +- link => "http://backuppc.wiki.sourceforge.net", +- name => "Wiki", # displays literal "Wiki" +- }, +- { +- link => "http://backuppc.sourceforge.net", +- name => "SourceForge", # displays literal "SourceForge" +- }, ++ { ++ 'link' => '?action=view&type=docs', ++ 'lname' => 'Documentation', ++ 'name' => undef ++ }, ++ { ++ 'link' => 'http://backuppc.wiki.sourceforge.net', ++ 'lname' => undef, ++ 'name' => 'Wiki' ++ }, ++ { ++ 'link' => 'http://backuppc.sourceforge.net', ++ 'lname' => undef, ++ 'name' => 'SourceForge' ++ } + ]; + + # + # Hilight colors based on status that are used in the PC summary page. + # + $Conf{CgiStatusHilightColor} = { +- Reason_backup_failed => '#ffcccc', +- Reason_backup_done => '#ccffcc', +- Reason_no_ping => '#ffff99', +- Reason_backup_canceled_by_user => '#ff9900', +- Status_backup_in_progress => '#66cc99', +- Disabled_OnlyManualBackups => '#d1d1d1', +- Disabled_AllBackupsDisabled => '#d1d1d1', ++ 'Reason_backup_failed' => '#ffcccc', ++ 'Reason_backup_done' => '#ccffcc', ++ 'Reason_backup_canceled_by_user' => '#ff9900', ++ 'Reason_no_ping' => '#ffff99', ++ 'Disabled_OnlyManualBackups' => '#d1d1d1', ++ 'Status_backup_in_progress' => '#66cc99', ++ 'Disabled_AllBackupsDisabled' => '#d1d1d1' + }; + + # +@@ -2138,7 +2140,7 @@ + # 'pl' => 'text/plain', + # }; + # +-$Conf{CgiExt2ContentType} = { }; ++$Conf{CgiExt2ContentType} = {}; + + # + # URL (without the leading http://host) for BackupPC's image directory. +@@ -2163,7 +2165,7 @@ + # + # Whether the user is allowed to edit their per-PC config. + # +-$Conf{CgiUserConfigEditEnable} = 1; ++$Conf{CgiUserConfigEditEnable} = '1'; + + # + # Which per-host config variables a non-admin user is allowed +@@ -2177,96 +2179,96 @@ + # sorts of bad things. + # + $Conf{CgiUserConfigEdit} = { +- FullPeriod => 1, +- IncrPeriod => 1, +- FullKeepCnt => 1, +- FullKeepCntMin => 1, +- FullAgeMax => 1, +- IncrKeepCnt => 1, +- IncrKeepCntMin => 1, +- IncrAgeMax => 1, +- IncrLevels => 1, +- IncrFill => 1, +- PartialAgeMax => 1, +- RestoreInfoKeepCnt => 1, +- ArchiveInfoKeepCnt => 1, +- BackupFilesOnly => 1, +- BackupFilesExclude => 1, +- BackupsDisable => 1, +- BlackoutBadPingLimit => 1, +- BlackoutGoodCnt => 1, +- BlackoutPeriods => 1, +- BackupZeroFilesIsFatal => 1, +- ClientCharset => 1, +- ClientCharsetLegacy => 1, +- XferMethod => 1, +- XferLogLevel => 1, +- SmbShareName => 1, +- SmbShareUserName => 1, +- SmbSharePasswd => 1, +- SmbClientFullCmd => 0, +- SmbClientIncrCmd => 0, +- SmbClientRestoreCmd => 0, +- TarShareName => 1, +- TarFullArgs => 1, +- TarIncrArgs => 1, +- TarClientCmd => 0, +- TarClientRestoreCmd => 0, +- TarClientPath => 0, +- RsyncShareName => 1, +- RsyncdClientPort => 1, +- RsyncdPasswd => 1, +- RsyncdUserName => 1, +- RsyncdAuthRequired => 1, +- RsyncCsumCacheVerifyProb => 1, +- RsyncArgs => 1, +- RsyncArgsExtra => 1, +- RsyncRestoreArgs => 1, +- RsyncClientCmd => 0, +- RsyncClientRestoreCmd => 0, +- RsyncClientPath => 0, +- FtpShareName => 1, +- FtpUserName => 1, +- FtpPasswd => 1, +- FtpBlockSize => 1, +- FtpPort => 1, +- FtpTimeout => 1, +- FtpFollowSymlinks => 1, +- FtpRestoreEnabled => 1, +- ArchiveDest => 1, +- ArchiveComp => 1, +- ArchivePar => 1, +- ArchiveSplit => 1, +- ArchiveClientCmd => 0, +- FixedIPNetBiosNameCheck => 1, +- NmbLookupCmd => 0, +- NmbLookupFindHostCmd => 0, +- PingMaxMsec => 1, +- PingCmd => 0, +- ClientTimeout => 1, +- MaxOldPerPCLogFiles => 1, +- CompressLevel => 1, +- ClientNameAlias => 1, +- DumpPreUserCmd => 0, +- DumpPostUserCmd => 0, +- RestorePreUserCmd => 0, +- RestorePostUserCmd => 0, +- ArchivePreUserCmd => 0, +- ArchivePostUserCmd => 0, +- DumpPostShareCmd => 0, +- DumpPreShareCmd => 0, +- UserCmdCheckStatus => 0, +- EMailNotifyMinDays => 1, +- EMailFromUserName => 1, +- EMailAdminUserName => 1, +- EMailUserDestDomain => 1, +- EMailNoBackupEverSubj => 1, +- EMailNoBackupEverMesg => 1, +- EMailNotifyOldBackupDays => 1, +- EMailNoBackupRecentSubj => 1, +- EMailNoBackupRecentMesg => 1, +- EMailNotifyOldOutlookDays => 1, +- EMailOutlookBackupSubj => 1, +- EMailOutlookBackupMesg => 1, +- EMailHeaders => 1, ++ FullPeriod => 1, ++ IncrPeriod => 1, ++ FullKeepCnt => 1, ++ FullKeepCntMin => 1, ++ FullAgeMax => 1, ++ IncrKeepCnt => 1, ++ IncrKeepCntMin => 1, ++ IncrAgeMax => 1, ++ IncrLevels => 1, ++ IncrFill => 1, ++ PartialAgeMax => 1, ++ RestoreInfoKeepCnt => 1, ++ ArchiveInfoKeepCnt => 1, ++ BackupFilesOnly => 1, ++ BackupFilesExclude => 1, ++ BackupsDisable => 1, ++ BlackoutBadPingLimit => 1, ++ BlackoutGoodCnt => 1, ++ BlackoutPeriods => 1, ++ BackupZeroFilesIsFatal => 1, ++ ClientCharset => 1, ++ ClientCharsetLegacy => 1, ++ XferMethod => 1, ++ XferLogLevel => 1, ++ SmbShareName => 1, ++ SmbShareUserName => 1, ++ SmbSharePasswd => 1, ++ SmbClientFullCmd => 0, ++ SmbClientIncrCmd => 0, ++ SmbClientRestoreCmd => 0, ++ TarShareName => 1, ++ TarFullArgs => 1, ++ TarIncrArgs => 1, ++ TarClientCmd => 0, ++ TarClientRestoreCmd => 0, ++ TarClientPath => 0, ++ RsyncShareName => 1, ++ RsyncdClientPort => 1, ++ RsyncdPasswd => 1, ++ RsyncdUserName => 1, ++ RsyncdAuthRequired => 1, ++ RsyncCsumCacheVerifyProb => 1, ++ RsyncArgs => 1, ++ RsyncArgsExtra => 1, ++ RsyncRestoreArgs => 1, ++ RsyncClientCmd => 0, ++ RsyncClientRestoreCmd => 0, ++ RsyncClientPath => 0, ++ FtpShareName => 1, ++ FtpUserName => 1, ++ FtpPasswd => 1, ++ FtpBlockSize => 1, ++ FtpPort => 1, ++ FtpTimeout => 1, ++ FtpFollowSymlinks => 1, ++ FtpRestoreEnabled => 1, ++ ArchiveDest => 1, ++ ArchiveComp => 1, ++ ArchivePar => 1, ++ ArchiveSplit => 1, ++ ArchiveClientCmd => 0, ++ FixedIPNetBiosNameCheck => 1, ++ NmbLookupCmd => 0, ++ NmbLookupFindHostCmd => 0, ++ PingMaxMsec => 1, ++ PingCmd => 0, ++ ClientTimeout => 1, ++ MaxOldPerPCLogFiles => 1, ++ CompressLevel => 1, ++ ClientNameAlias => 1, ++ DumpPreUserCmd => 0, ++ DumpPostUserCmd => 0, ++ RestorePreUserCmd => 0, ++ RestorePostUserCmd => 0, ++ ArchivePreUserCmd => 0, ++ ArchivePostUserCmd => 0, ++ DumpPostShareCmd => 0, ++ DumpPreShareCmd => 0, ++ UserCmdCheckStatus => 0, ++ EMailNotifyMinDays => 1, ++ EMailFromUserName => 1, ++ EMailAdminUserName => 1, ++ EMailUserDestDomain => 1, ++ EMailNoBackupEverSubj => 1, ++ EMailNoBackupEverMesg => 1, ++ EMailNotifyOldBackupDays => 1, ++ EMailNoBackupRecentSubj => 1, ++ EMailNoBackupRecentMesg => 1, ++ EMailNotifyOldOutlookDays => 1, ++ EMailOutlookBackupSubj => 1, ++ EMailOutlookBackupMesg => 1, ++ EMailHeaders => 1, + }; diff --git a/app-backup/backuppc/files/3.2.0/03-reasonable-config.pl-defaults.patch b/app-backup/backuppc/files/3.2.0/03-reasonable-config.pl-defaults.patch new file mode 100644 index 000000000000..06075f9e17c9 --- /dev/null +++ b/app-backup/backuppc/files/3.2.0/03-reasonable-config.pl-defaults.patch @@ -0,0 +1,47 @@ +--- conf/config.pl.formatted 2010-09-03 23:09:13.035788559 +0300 ++++ conf/config.pl 2010-09-03 23:10:19.314788450 +0300 +@@ -1319,6 +1319,8 @@ + '--times', + '--block-size=2048', + '--recursive', ++ '--specials', ++ '--checksum-seed=32761', + ]; + + # +@@ -1385,6 +1387,8 @@ + '--relative', + '--ignore-times', + '--recursive', ++ '--specials', ++ '--checksum-seed=32761', + ]; + + ########################################################################### +@@ -2015,7 +2019,7 @@ + # --> administrative users are only craig and celia'. + # + $Conf{CgiAdminUserGroup} = ''; +-$Conf{CgiAdminUsers} = ''; ++$Conf{CgiAdminUsers} = 'backuppc'; + + # + # URL of the BackupPC_Admin CGI script. Used for email messages. +@@ -2062,7 +2066,7 @@ + # dates (MM/DD), a value of 2 uses full YYYY-MM-DD format, and zero + # for international dates (DD/MM). + # +-$Conf{CgiDateFormatMMDD} = 1; ++$Conf{CgiDateFormatMMDD} = 2; + + # + # If set, the complete list of hosts appears in the left navigation +@@ -2248,7 +2252,7 @@ + ClientTimeout => 1, + MaxOldPerPCLogFiles => 1, + CompressLevel => 1, +- ClientNameAlias => 1, ++ ClientNameAlias => 0, + DumpPreUserCmd => 0, + DumpPostUserCmd => 0, + RestorePreUserCmd => 0, diff --git a/app-backup/backuppc/files/3.2.0/04-add-docdir-marker.patch b/app-backup/backuppc/files/3.2.0/04-add-docdir-marker.patch new file mode 100644 index 000000000000..0355aedf04b7 --- /dev/null +++ b/app-backup/backuppc/files/3.2.0/04-add-docdir-marker.patch @@ -0,0 +1,11 @@ +--- lib/BackupPC/CGI/View.pm.orig 2009-09-30 19:08:34.353577546 +0300 ++++ lib/BackupPC/CGI/View.pm 2009-09-30 19:16:01.982412712 +0300 +@@ -86,7 +86,7 @@ + $file = $bpc->ConfDir() . "/hosts"; + $linkHosts = 1; + } elsif ( $type eq "docs" ) { +- $file = $bpc->InstallDir() . "/doc/BackupPC.html"; ++ $file = "__DOCDIR__/BackupPC.html"; + } elsif ( $host ne "" ) { + if ( !defined($In{num}) ) { + # get the latest LOG file diff --git a/app-backup/backuppc/files/3.2.0/05-nicelevel.patch b/app-backup/backuppc/files/3.2.0/05-nicelevel.patch new file mode 100644 index 000000000000..50938f60bcdc --- /dev/null +++ b/app-backup/backuppc/files/3.2.0/05-nicelevel.patch @@ -0,0 +1,18 @@ +--- init.d/src/gentoo-backuppc.orig 2009-10-18 00:14:44.125346723 +0300 ++++ init.d/src/gentoo-backuppc 2009-10-18 00:15:37.101346981 +0300 +@@ -21,7 +21,7 @@ + start() { + checkconfig || return 1 + ebegin "Starting BackupPC" +- start-stop-daemon --start --chuid ${USER} --user ${USER} --pidfile ${PID_FILE} --exec ${EXEC} -- ${EXEC_OPTIONS} ++ start-stop-daemon --start --chuid ${USER} --user ${USER} --nicelevel ${NICELEVEL} --pidfile ${PID_FILE} --exec ${EXEC} -- ${EXEC_OPTIONS} + eend $? + } + +--- init.d/src/gentoo-backuppc.conf.orig 2009-10-18 00:14:52.513347638 +0300 ++++ init.d/src/gentoo-backuppc.conf 2009-10-18 00:16:03.457346630 +0300 +@@ -3,3 +3,4 @@ + PID_FILE=__LOGDIR__/BackupPC.pid + EXEC=__INSTALLDIR__/bin/BackupPC + EXEC_OPTIONS=-d ++NICELEVEL=0 diff --git a/app-backup/backuppc/files/apache2-backuppc.conf b/app-backup/backuppc/files/apache2-backuppc.conf new file mode 100644 index 000000000000..fb9b0b8ca90c --- /dev/null +++ b/app-backup/backuppc/files/apache2-backuppc.conf @@ -0,0 +1,73 @@ +# /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 +# 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/apache2-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" diff --git a/app-backup/backuppc/files/apache2-backuppc.init b/app-backup/backuppc/files/apache2-backuppc.init new file mode 100644 index 000000000000..42e89c6cc6dd --- /dev/null +++ b/app-backup/backuppc/files/apache2-backuppc.init @@ -0,0 +1,170 @@ +#!/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 diff --git a/app-backup/backuppc/files/httpd.conf b/app-backup/backuppc/files/httpd.conf new file mode 100644 index 000000000000..00493d865acf --- /dev/null +++ b/app-backup/backuppc/files/httpd.conf @@ -0,0 +1,332 @@ +# This is a modification of the default Apache 2.2 configuration file +# for Gentoo Linux. +# +# Support: +# http://www.gentoo.org/main/en/lists.xml [mailing lists] +# http://forums.gentoo.org/ [web forums] +# irc://irc.freenode.net#gentoo-apache [irc chat] +# +# Bug Reports: +# http://bugs.gentoo.org [gentoo related bugs] +# http://httpd.apache.org/bug_report.html [apache httpd related bugs] +# +# +# This is the main Apache HTTP server configuration file. It contains the +# configuration directives that give the server its instructions. +# See for detailed information. +# In particular, see +# +# for a discussion of each configuration directive. +# +# Do NOT simply read the instructions in here without understanding +# what they do. They're here only as hints or reminders. If you are unsure +# consult the online docs. You have been warned. +# +# Configuration and logfile names: If the filenames you specify for many +# of the server's control files begin with "/" (or "drive:/" for Win32), the +# server will use that explicit path. If the filenames do *not* begin +# with "/", the value of ServerRoot is prepended -- so "var/log/apache2/foo_log" +# with ServerRoot set to "/usr" will be interpreted by the +# server as "/usr/var/log/apache2/foo.log". + +# ServerRoot: The top of the directory tree under which the server's +# configuration, error, and log files are kept. +# +# Do not add a slash at the end of the directory path. If you point +# ServerRoot at a non-local disk, be sure to point the LockFile directive +# at a local disk. If you wish to share the same ServerRoot for multiple +# httpd daemons, you will need to change at least LockFile and PidFile. +ServerRoot "/usr/lib/apache2" + +# Dynamic Shared Object (DSO) Support +# +# To be able to use the functionality of a module which was built as a DSO you +# have to place corresponding `LoadModule' lines at this location so the +# directives contained in it are actually available _before_ they are used. +# Statically compiled modules (those listed by `httpd -l') do not need +# to be loaded here. +# +# Example: +# LoadModule foo_module modules/mod_foo.so +# +# GENTOO: Automatically defined based on APACHE2_MODULES USE_EXPAND variable. +# Do not change manually, it will be overwritten on upgrade. +# +# The following modules are considered as the default configuration. +# If you wish to disable one of them, you may have to alter other +# configuration directives. +# +# Change these at your own risk! + +LoadModule actions_module modules/mod_actions.so +LoadModule alias_module modules/mod_alias.so +LoadModule auth_basic_module modules/mod_auth_basic.so + +LoadModule auth_digest_module modules/mod_auth_digest.so + +LoadModule authn_anon_module modules/mod_authn_anon.so +LoadModule authn_dbm_module modules/mod_authn_dbm.so +LoadModule authn_default_module modules/mod_authn_default.so +LoadModule authn_file_module modules/mod_authn_file.so +LoadModule authz_dbm_module modules/mod_authz_dbm.so +LoadModule authz_default_module modules/mod_authz_default.so +LoadModule authz_groupfile_module modules/mod_authz_groupfile.so +LoadModule authz_host_module modules/mod_authz_host.so +LoadModule authz_owner_module modules/mod_authz_owner.so +LoadModule authz_user_module modules/mod_authz_user.so +LoadModule autoindex_module modules/mod_autoindex.so + +LoadModule cache_module modules/mod_cache.so + +LoadModule cgi_module modules/mod_cgi.so +LoadModule deflate_module modules/mod_deflate.so +LoadModule dir_module modules/mod_dir.so + +LoadModule disk_cache_module modules/mod_disk_cache.so + +LoadModule env_module modules/mod_env.so +LoadModule expires_module modules/mod_expires.so +LoadModule ext_filter_module modules/mod_ext_filter.so + +LoadModule file_cache_module modules/mod_file_cache.so + +LoadModule filter_module modules/mod_filter.so +LoadModule headers_module modules/mod_headers.so +LoadModule include_module modules/mod_include.so + +LoadModule info_module modules/mod_info.so + +LoadModule log_config_module modules/mod_log_config.so +LoadModule logio_module modules/mod_logio.so + +LoadModule mem_cache_module modules/mod_mem_cache.so + +LoadModule mime_module modules/mod_mime.so +LoadModule mime_magic_module modules/mod_mime_magic.so +LoadModule negotiation_module modules/mod_negotiation.so + +LoadModule proxy_module modules/mod_proxy.so + + +LoadModule proxy_ajp_module modules/mod_proxy_ajp.so + + +LoadModule proxy_balancer_module modules/mod_proxy_balancer.so + + +LoadModule proxy_connect_module modules/mod_proxy_connect.so + + +LoadModule proxy_http_module modules/mod_proxy_http.so + +LoadModule rewrite_module modules/mod_rewrite.so +LoadModule setenvif_module modules/mod_setenvif.so +LoadModule speling_module modules/mod_speling.so + +LoadModule ssl_module modules/mod_ssl.so + + +LoadModule status_module modules/mod_status.so + + +LoadModule suexec_module modules/mod_suexec.so + +LoadModule unique_id_module modules/mod_unique_id.so + +LoadModule userdir_module modules/mod_userdir.so + +LoadModule usertrack_module modules/mod_usertrack.so +LoadModule vhost_alias_module modules/mod_vhost_alias.so + +# +# HostnameLookups: Log the names of clients or just their IP addresses +# e.g., www.apache.org (on) or 204.62.129.132 (off). +# The default is off because it'd be overall better for the net if people +# had to knowingly turn this feature on, since enabling it means that +# each client request will result in AT LEAST one lookup request to the +# nameserver. +# +HostnameLookups Off + +# If you wish httpd to run as a different user or group, you must run +# httpd as root initially and it will switch. +# +# User/Group: The name (or #number) of the user/group to run httpd as. +# It is usually good practice to create a dedicated user and group for +# running httpd, as with most system services. +User backuppc +Group backuppc + +# Supplemental configuration +# +# Most of the configuration files in the /etc/apache2/modules.d/ directory can +# be turned on using APACHE2_OPTS in /etc/conf.d/apache2 to add extra features +# or to modify the default configuration of the server. +# +# To know which flag to add to APACHE2_OPTS, look at the first line of the +# the file, which will usually be an where OPTION is the +# flag to use. + +Include /etc/apache2/modules.d/*.conf + +# Unique lock file +LockFile /var/lock/apache-backuppc.lock + +# Very important for init script +# Unique process ID file +PidFile /var/run/apache-backuppc.pid + +# Unique scoreboard file +ScoreBoardFile /var/run/apache-backuppc.scoreboard + +# Common document root + + + +# Common document root +DocumentRoot HTDOCSDIR +# see bug #178966 why this is in here + +# Listen: Allows you to bind Apache to specific IP addresses and/or +# ports, instead of the default. See also the +# directive. +# +# Change this to Listen on specific IP addresses as shown below to +# prevent Apache from glomming onto all bound IP addresses. +# +#Listen 12.34.56.78:80 +Listen 80 + +# Use name-based virtual hosting. +NameVirtualHost *:80 + +# When virtual hosts are enabled, the main host defined in the default +# httpd.conf configuration will go away. We redefine it here so that it is +# still available. +# +# If you disable this vhost by removing -D DEFAULT_VHOST from +# /etc/conf.d/apache2, the first defined virtual host elsewhere will be +# the default. + + ServerName backuppc + + # Redirect requests to "/" to the CGI script + RedirectMatch "^/$" /BackupPC_Admin + + + + RewriteEngine On + RewriteCond %{HTTPS} !=on + RewriteRule ^/(.*) https://%{SERVER_NAME}/$1 [R,L] + + ## SSL Engine Switch: + # Enable/Disable SSL for this virtual host. + SSLEngine on + SSLOptions +StrictRequire + + ## SSL Cipher Suite: + # List the ciphers that the client is permitted to negotiate. + # See the mod_ssl documentation for a complete list. + SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL + + ## Server Certificate: + # Point SSLCertificateFile at a PEM encoded certificate. If the certificate + # is encrypted, then you will be prompted for a pass phrase. Note that a + # kill -HUP will prompt again. Keep in mind that if you have both an RSA + # and a DSA certificate you can configure both in parallel (to also allow + # the use of DSA ciphers, etc.) + SSLCertificateFile /etc/ssl/apache2/server.crt + + ## Server Private Key: + # If the key is not combined with the certificate, use this directive to + # point at the key file. Keep in mind that if you've both a RSA and a DSA + # private key you can configure both in parallel (to also allow the use of + # DSA ciphers, etc.) + SSLCertificateKeyFile /etc/ssl/apache2/server.key + + SSLOptions +StdEnvVars + + + ## ssl-accurate-shutdown: + # This forces an accurate shutdown when the connection is closed, i.e. a + # SSL close notify alert is send and mod_ssl waits for the close notify + # alert of the client. This is 100% SSL/TLS standard compliant, but in + # practice often causes hanging connections with brain-dead browsers. Use + # this only for browsers where you know that their SSL implementation works + # correctly. + # Notice: Most problems of broken clients are also related to the HTTP + # keep-alive facility, so you usually additionally want to disable + # keep-alive for those clients, too. Use variable "nokeepalive" for this. + # Similarly, one has to force some clients to use HTTP/1.0 to workaround + # their broken HTTP/1.1 implementation. Use variables "downgrade-1.0" and + # "force-response-1.0" for this. + + BrowserMatch ".*MSIE.*" \ + nokeepalive ssl-unclean-shutdown \ + downgrade-1.0 force-response-1.0 + + + ## Per-Server Logging: + # The home of a custom SSL log file. Use this when you want a compact + # non-error SSL logfile on a virtual host basis. + + CustomLog /var/log/apache2/ssl_request_log \ + "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b" + + + + + + # Possible values for the Options directive are "None", "All", + # or any combination of: + # Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews + # + # Note that "MultiViews" must be named *explicitly* --- "Options All" + # doesn't give it to you. + # + # The Options directive is both complicated and important. Please see + # http://httpd.apache.org/docs/2.2/mod/core.html#options + # for more information. + Options Indexes FollowSymLinks + + # AllowOverride controls what directives may be placed in .htaccess files. + # It can be "All", "None", or any combination of the keywords: + # Options FileInfo AuthConfig Limit + AllowOverride None + + + + SSLOptions +StdEnvVars + + + + SetHandler perl-script + PerlResponseHandler ModPerl::Registry + PerlOptions +ParseHeaders + Options +ExecCGI + + Order allow,deny + Allow from all + + AuthName "Backup Admin" + AuthType Basic + AuthUserFile AUTHFILE + Require valid-user + + + + SetHandler None + Options Indexes FollowSymLinks + Order allow,deny + Allow from all + + + + + ServerEnvironment backuppc backuppc + + + + + +# vim: ts=4 filetype=apache -- cgit v1.2.3-65-gdbad