Update to 5.2.11

This commit is contained in:
Simone Caronni 2012-09-12 13:20:53 +02:00
parent 2529f6ce9d
commit b41046967f
5 changed files with 13 additions and 201 deletions

1
.gitignore vendored
View File

@ -14,3 +14,4 @@ bacula-docs-5.0.3.tar.bz2
/bacula-5.2.8.tar.gz
/bacula-5.2.9.tar.gz
/bacula-5.2.10.tar.gz
/bacula-5.2.11.tar.gz

View File

@ -1,148 +0,0 @@
--- manpages/bsmtp.1.old.old 2012-06-28 16:52:03.000000000 +0200
+++ manpages/bsmtp.1 2012-07-10 14:39:27.818315931 +0200
@@ -2,7 +2,7 @@
.\" First parameter, NAME, should be all caps
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
.\" other parameters are allowed: see man(7), man(1)
-.TH BSMTP 1 "6 December 2009" "Kern Sibbald" "Network backup, recovery and verification"
+.TH BSMTP 1 "3 July 2012" "Kern Sibbald" "Network backup, recovery and verification"
.\" Please adjust this date whenever revising the manpage.
.\"
.SH NAME
@@ -23,9 +23,18 @@
.SH OPTIONS
.TP
+.B \-4
+Forces bsmtp to use IPv4 addresses only.
+.TP
+.B \-6
+Forces bsmtp to use IPv6 addresses only.
+.TP
.B \-8
Encode the mail in UTF-8.
.TP
+.B \-a
+Use any ip protocol for address resolution.
+.TP
.B \-c
Set the \fBCc:\fR header.
.TP
@@ -115,4 +124,4 @@
.nh
<lbc@members.fsf.org>.
.SH SEE ALSO
-.BR "bacula-dir" "(8) "
\ No newline at end of file
+.BR "bacula-dir" "(8) "
--- src/tools/bsmtp.c.old 2012-06-28 16:52:03.000000000 +0200
+++ src/tools/bsmtp.c 2012-07-10 14:39:27.967318985 +0200
@@ -85,6 +85,12 @@
#define MAXSTRING 254
#endif
+enum resolv_type {
+ RESOLV_PROTO_ANY,
+ RESOLV_PROTO_IPV4,
+ RESOLV_PROTO_IPV6
+};
+
static FILE *sfp;
static FILE *rfp;
@@ -97,6 +103,7 @@
static int mailport = 25;
static char my_hostname[MAXSTRING];
static bool content_utf8 = false;
+static resolv_type default_resolv_type = RESOLV_PROTO_IPV4;
/*
* Take input that may have names and other stuff and strip
@@ -185,7 +192,12 @@
fprintf(stderr,
_("\n"
"Usage: %s [-f from] [-h mailhost] [-s subject] [-c copy] [recipient ...]\n"
+" -4 forces bsmtp to use IPv4 addresses only.\n"
+#ifdef HAVE_IPV6
+" -6 forces bsmtp to use IPv6 addresses only.\n"
+#endif
" -8 set charset to UTF-8\n"
+" -a use any ip protocol for address resolution\n"
" -c set the Cc: field\n"
" -d <nn> set debug level to <nn>\n"
" -dt print a timestamp in debug output\n"
@@ -277,6 +289,11 @@
struct hostent *hp;
struct sockaddr_in sin;
#endif
+#ifdef HAVE_IPV6
+ const char *options = "468ac:d:f:h:r:s:l:?";
+#else
+ const char *options = "48ac:d:f:h:r:s:l:?";
+#endif
setlocale(LC_ALL, "en_US");
bindtextdomain("bacula", LOCALEDIR);
@@ -285,11 +302,26 @@
my_name_is(argc, argv, "bsmtp");
maxlines = 0;
- while ((ch = getopt(argc, argv, "8c:d:f:h:r:s:l:?")) != -1) {
+ while ((ch = getopt(argc, argv, options)) != -1) {
switch (ch) {
+ case '4':
+ default_resolv_type = RESOLV_PROTO_IPV4;
+ break;
+
+#ifdef HAVE_IPV6
+ case '6':
+ default_resolv_type = RESOLV_PROTO_IPV6;
+ break;
+#endif
+
case '8':
content_utf8 = true;
break;
+
+ case 'a':
+ default_resolv_type = RESOLV_PROTO_ANY;
+ break;
+
case 'c':
Dmsg1(20, "cc=%s\n", optarg);
cc_addr = optarg;
@@ -430,16 +462,31 @@
lookup_host:
#ifdef HAVE_GETADDRINFO
memset(&hints, 0, sizeof(struct addrinfo));
- hints.ai_family = AF_UNSPEC;
+ switch (default_resolv_type) {
+ case RESOLV_PROTO_ANY:
+ hints.ai_family = AF_UNSPEC;
+ break;
+ case RESOLV_PROTO_IPV4:
+ hints.ai_family = AF_INET;
+ break;
+#ifdef HAVE_IPV6
+ case RESOLV_PROTO_IPV6:
+ hints.ai_family = AF_INET6;
+ break;
+#endif
+ default:
+ hints.ai_family = AF_UNSPEC;
+ break;
+ }
hints.ai_socktype = SOCK_STREAM;
- hints.ai_protocol = IPPROTO_TCP;
+ hints.ai_protocol = 0;
hints.ai_flags = 0;
snprintf(mail_port, sizeof(mail_port), "%d", mailport);
if ((res = getaddrinfo(mailhost, mail_port, &hints, &ai)) != 0) {
Pmsg2(0, _("Error unknown mail host \"%s\": ERR=%s\n"),
mailhost, gai_strerror(res));
- if (!strcasecmp(mailhost, "localhost")) {
+ if (strcasecmp(mailhost, "localhost")) {
Pmsg0(0, _("Retrying connection using \"localhost\".\n"));
mailhost = "localhost";
goto lookup_host;

View File

@ -1,41 +0,0 @@
diff -Naur bacula-5.2.10.old/scripts/logrotate.in bacula-5.2.10/scripts/logrotate.in
--- bacula-5.2.10.old/scripts/logrotate.in 2012-07-16 10:28:18.315149487 +0200
+++ bacula-5.2.10/scripts/logrotate.in 2012-07-16 10:30:32.024248913 +0200
@@ -6,7 +6,7 @@
#
# /etc/logrotate.d/bacula
#
-@working_dir@/log {
+@logdir@/bacula.log {
monthly
rotate 5
notifempty
diff -Naur bacula-5.2.10.old/scripts/logwatch/logfile.bacula.conf.in bacula-5.2.10/scripts/logwatch/logfile.bacula.conf.in
--- bacula-5.2.10.old/scripts/logwatch/logfile.bacula.conf.in 2012-07-16 10:28:18.314149434 +0200
+++ bacula-5.2.10/scripts/logwatch/logfile.bacula.conf.in 2012-07-16 10:29:33.428805897 +0200
@@ -1,3 +1,3 @@
# What actual file? Defaults to LogPath if not absolute path....
-LogFile = @working_dir@/log
+LogFile = @logdir@/bacula.log
diff -Naur bacula-5.2.10.old/src/dird/bacula-dir.conf.in bacula-5.2.10/src/dird/bacula-dir.conf.in
--- bacula-5.2.10.old/src/dird/bacula-dir.conf.in 2012-07-16 10:28:18.114138847 +0200
+++ bacula-5.2.10/src/dird/bacula-dir.conf.in 2012-07-16 10:28:33.508940427 +0200
@@ -261,7 +261,7 @@
# time to time as it will grow indefinitely. However, it will
# also keep all your messages if they scroll off the console.
#
- append = "@working_dir@/log" = all, !skipped
+ append = "@logdir@/bacula.log" = all, !skipped
catalog = all
}
@@ -273,7 +273,7 @@
mailcommand = "@sbindir@/bsmtp -h @smtp_host@ -f \"\(Bacula\) \<%r\>\" -s \"Bacula daemon message\" %r"
mail = @job_email@ = all, !skipped
console = all, !skipped, !saved
- append = "@working_dir@/log" = all, !skipped
+ append = "@logdir@/bacula.log" = all, !skipped
}
# Default pool definition

View File

@ -2,8 +2,8 @@
%global username bacula
Name: bacula
Version: 5.2.10
Release: 7%{?dist}
Version: 5.2.11
Release: 1%{?dist}
Summary: Cross platform network backup for Linux, Unix, Mac and Windows
# See LICENSE for details
License: AGPLv3 with exceptions
@ -30,10 +30,8 @@ Source19: bacula-checkconf
Patch1: bacula-5.0.2-openssl.patch
Patch2: bacula-5.2.2-queryfile.patch
Patch3: bacula-5.2.10-log-path.patch
Patch4: bacula-5.0.3-sqlite-priv.patch
Patch5: bacula-5.2.7-bat-build.patch
Patch6: bacula-5.2.10-bsmtp.patch
Patch3: bacula-5.0.3-sqlite-priv.patch
Patch4: bacula-5.2.7-bat-build.patch
BuildRequires: desktop-file-utils
BuildRequires: perl
@ -288,10 +286,8 @@ Provides check_bacula support for Nagios.
%setup -q
%patch1 -p2 -b .openssl
%patch2 -p1 -b .queryfile
%patch3 -p1 -b .log-path
%patch4 -p0 -b .priv
%patch5 -p1 -b .bat-build
%patch6 -p0 -b .bsmtp
%patch3 -p0 -b .priv
%patch4 -p1 -b .bat-build
# Remove execution permissions from files we're packaging as docs later on
find updatedb -type f | xargs chmod -x
@ -339,7 +335,7 @@ export CPPFLAGS="$RPM_OPT_FLAGS -I%{_includedir}/ncurses"
%if 0%{?fedora} || 0%{?rhel} >= 6
export QMAKE=/usr/bin/qmake-qt4
build --enable-bat --htmldir=%{_datadir}/doc/bacula-console-bat-%{version}
build --enable-bat --docdir=%{_datadir}/doc/bacula-console-bat-%{version}
%else
build --disable-bat
%endif
@ -887,6 +883,10 @@ fi
%changelog
* Tue Sep 11 2012 Simone Caronni <negativo17@gmail.com> - 5.2.11-1
- Update to 5.2.11.
- Removed upstreamed patches.
* Tue Sep 11 2012 Simone Caronni <negativo17@gmail.com> - 5.2.10-7
- Add Fedora 18 systemd macros.
- Remove old distribution checks.

View File

@ -1 +1 @@
19207d7049cf11a54dee5585689044ec bacula-5.2.10.tar.gz
f18d826e2d5375714f71e482f6f98ed5 bacula-5.2.11.tar.gz