burp2-server: update to 2.0.40 (#4288)

This commit is contained in:
yopito 2016-06-15 07:35:32 +02:00 committed by Juan RP
parent e6bc45d3ce
commit 15004ab88f
2 changed files with 105 additions and 2 deletions

View File

@ -0,0 +1,99 @@
Fixes from upstream:
b56782e Bug fix for status client ncurses with -C showing last backup only.
7e49ed0 Fallback to /usr/sbin/burp for the forked 'burp -a m' process.
XXX hardcoded burp path in this patch
Discarded changes on files DONATIONS and test framework (utest/).
diff --git a/src/client/monitor/status_client_ncurses.c b/src/client/monitor/status_client_ncurses.c
index f1a0bcf..ebba632 100644
--- a/src/client/monitor/status_client_ncurses.c
+++ b/src/client/monitor/status_client_ncurses.c
@@ -436,7 +436,8 @@ static int need_status(struct sel *sel)
time_t now=0;
time_t diff=0;
- if(sel->page==PAGE_VIEW_LOG && sel->llines) return 0;
+ if(sel->page==PAGE_VIEW_LOG && sel->llines)
+ return 0;
// Only ask for an update every second.
now=time(NULL);
@@ -1353,6 +1354,12 @@ int status_client_ncurses_main_loop(struct async *as,
}
if(request_status(sfd, req, sel))
goto error;
+
+ // We only want to start on the client the user gave to
+ // us. Freeing it will allow the user to browse other
+ // clients thereafter.
+ free_w(&client);
+
if(actg==ACTION_STATUS_SNAPSHOT)
reqdone=1;
}
@@ -1442,7 +1449,10 @@ static pid_t fork_monitor(int *csin, int *csout, struct conf **confs)
char *args[12];
// FIX THIS: get all args from configuration.
- args[a++]=(char *)prog_long;
+ if(is_reg_lstat(prog_long)>0)
+ args[a++]=(char *)prog_long;
+ else
+ args[a++]=(char *)"/usr/sbin/burp";
args[a++]=(char *)"-c";
args[a++]=get_string(confs[OPT_CONFFILE]);
args[a++]=(char *)"-a";
diff --git a/src/fsops.c b/src/fsops.c
index 52c1a28..47dff3b 100644
--- a/src/fsops.c
+++ b/src/fsops.c
@@ -30,6 +30,14 @@ int is_dir_lstat(const char *path)
return S_ISDIR(buf.st_mode);
}
+int is_reg_lstat(const char *path)
+{
+ struct stat buf;
+ if(lstat(path, &buf))
+ return -1;
+ return S_ISREG(buf.st_mode);
+}
+
int is_dir(const char *path, struct dirent *d)
{
#ifdef _DIRENT_HAVE_D_TYPE
diff --git a/src/fsops.h b/src/fsops.h
index 6c8786e..fb3783a 100644
--- a/src/fsops.h
+++ b/src/fsops.h
@@ -10,6 +10,7 @@ extern void close_fd(int *fd);
extern int is_dir(const char *path, struct dirent *d);
extern int is_dir_lstat(const char *path);
+extern int is_reg_lstat(const char *path);
extern int mkpath(char **rpath, const char *limit);
extern int build_path(const char *datadir, const char *fname,
char **rpath, const char *limit);
diff --git a/src/server/protocol1/backup_phase4.c b/src/server/protocol1/backup_phase4.c
index 511fdb1..06bd3a6 100644
--- a/src/server/protocol1/backup_phase4.c
+++ b/src/server/protocol1/backup_phase4.c
@@ -547,7 +547,7 @@ static int maybe_delete_files_from_manifest(const char *manifesttmp,
{
sbuf_free_content(db);
}
- else if(!mb->path.buf && !db->path.buf)
+ else if(!mb->path.buf && !db->path.buf)
{
continue;
}
@@ -596,7 +596,7 @@ end:
}
/* Need to make all the stuff that this does atomic so that existing backups
- never get broken, even if somebody turns the power off on the server. */
+ never get broken, even if somebody turns the power off on the server. */
static int atomic_data_jiggle(struct sdirs *sdirs, struct fdirs *fdirs,
int hardlinked_current, struct conf **cconfs)
{

View File

@ -2,15 +2,16 @@
_desc="A network-based backup and restore program"
pkgname=burp2-server
version=2.0.38
version=2.0.40
revision=1
short_desc="${_desc} - Server"
maintainer="Pierre Bourgin <pierre.bourgin@free.fr>"
license="AGPL-3, BSD, GPL-2.1 and LGPL-2.1"
homepage="http://burp.grke.org/"
wrksrc="burp-${version}"
patch_args='-Np1'
distfiles="${SOURCEFORGE_SITE}/burp/burp-${version}/burp-${version}.tar.bz2"
checksum=8c531f4ec94e5ead93cbdcf4900a74eae3ae2e93211ab694074c26e0e8363b7e
checksum=e2b8ab6963541f1ea320f4b0dc82a6f94b23e36d934a6dbe6e14ab5de79c53a0
hostmakedepends="automake libtool perl"
makedepends="
@ -55,6 +56,9 @@ post_install() {
vmkdir "${_docdir}/client"
vcopy "configs/client/cron.example" "${_docdir}/client"
vcopy "configs/client/zfs_script" "${_docdir}/client"
# do not define this backup client in server configuration
rm "${DESTDIR}/etc/burp/clientconfdir/testclient"
}
burp2-client_package() {