Discussion:
[BackupPC-devel] BackupPC 4.0.0alpha2 released
Craig Barratt
2013-09-18 06:21:29 UTC
Permalink
BackupPC community,

I'm pleased to announce that BackupPC 4.0.0alpha2 has been released on
SourceForge at:

https://sourceforge.net/projects/backuppc/files/backuppc-beta/4.0.0alpha2/


BackupPC 4.0.0alpha2 has a couple of new features and some bug fixes:

- support for an SCGI interface (which allows Apache to run as any user,
with requests handled by BackupPC_Admin_SCGI, which is run by the BackupPC
server).
- parallelizing BackupPC_refCountUpdate, which is run each night by
BackupPC_nightly.

If you are using alpha0 or alpha1, I recommend you upgrade.

Each of the three packages in the release has been updated. You should
upgrade all three packages:

- BackupPC-4.0.0alpha2.tar.gz: the usual BackupPC release tar ball.
- BackupPC-XS-0.20.tar.gz: a perl XS module with C code that replaces
several BackupPC perl libraries for improved performance.
- rsync-bpc-3.0.9.2.tar.gz: a modified rsync that runs on the server
that has a shim layer that interfaces directly to the BackupPC file
system.

I've attached some short notes on the build/install steps for each package.

This release is getting close to beta0. The only missing feature is FTP
xfer support.

I'd be interested in feedback.

Craig

BackupPC-XS-0.20.tar.gz:

tar zxvf BackupPC-XS-0.20.tar.gz
cd BackupPC-XS-0.20
perl Makefile.PL
make
make test
make install

rsync-bpc-3.0.9.2.tar.gz:

tar zxvf rsync-bpc-3.0.9.2.tar.gz
cd rsync-bpc-3.0.9.2
./configure.sh
make
make install

BackupPC-4.0.0alpha2.tar.gz:

tar zxvf BackupPC-4.0.0alpha2.tar.gz
cd BackupPC-4.0.0alpha2
./configure.pl

The last step for each will need to be run as a privileged user.

If you want to install rsync_bpc in /usr/local/bin (default might be
/usr/bin), then you should add the --prefix option to configure.sh:

./configure.sh --prefix=/usr/local
Kenneth Porter
2013-09-20 16:25:45 UTC
Permalink
I'm looking through the source RPM for 3.2.1 with intent to adapt it to
4.0.0 and it applies a number of patches, including some security ones.

Here's the content of the 3.2.1 source RPM:

<http://pkgs.fedoraproject.org/cgit/BackupPC.git/tree/>

It looks like all but one of the .patch files should be applied.
/BackupPC-3.2.1-fix-XSS-vulnerability2.patch is already applied but the
other XSS patch is not.

Two of the patches put the pid file and the socket in /var/run/BackupPC
rather than in the log directory, which I think is for selinux compliance.

The qw patch fixes a Perl warning.

The locatedb patch adds a check in the initscript to warn if the backups
are indexed (a potentially big performance hit if they are).
Craig Barratt
2013-09-22 18:55:18 UTC
Permalink
Kenneth,

It looks like all but one of the .patch files should be applied.
Post by Kenneth Porter
/BackupPC-3.2.1-fix-XSS-vulnerability2.patch is already applied but the
other XSS patch is not.
Both fixes shave been applied in both the 3.3.0 and 4.0.0 releases. I
fixed the second one in a slightly different manner than the submitted
patch. If you look down a couple of lines, there is a check that $num is
numeric. The XSS vulnerability comes from $num not being escaped in the
error message.

So I put the EscHTML() fix in the Invalid_number__num language strings.

The qw patch fixes a Perl warning.


These should also be fixed in both 3.3.0 and 4.0.0. Is there another case
that I missed?

Craig
Kenneth Porter
2013-09-22 21:53:48 UTC
Permalink
--On Sunday, September 22, 2013 12:55 PM -0700 Craig Barratt
Post by Craig Barratt
These should also be fixed in both 3.3.0 and 4.0.0. Is there another case
that I missed?
Thanks, I'll rescreen the code and remove those patches from the RPM.
Alexander Moisseev
2013-09-25 09:39:46 UTC
Permalink
BackupPC-XS-0.20 failed to build on FreeBSD 9.1-RELEASE.


***@alpha:/usr/home/moiseev/backuppc-4.0.0alpha2/BackupPC-XS-0.20 # perl Makefile.PL
Checking if your kit is complete...
Looks good
MakeMaker (v6.57_05)
Warning (non-fatal): Target 'dynamic' depends on targets in skipped section 'dynamic_lib'
Warning (non-fatal): Target 'static' depends on targets in skipped section 'static_lib'
Writing Makefile for BackupPC::XS::md5
Writing MYMETA.yml
MakeMaker (v6.57_05)
Warning (non-fatal): Target 'dynamic' depends on targets in skipped section 'dynamic_lib'
Warning (non-fatal): Target 'static' depends on targets in skipped section 'static_lib'
Writing Makefile for BackupPC::XS::zlib
Writing MYMETA.yml
Writing Makefile for BackupPC::XS
Writing MYMETA.yml


***@alpha:/usr/home/moiseev/backuppc-4.0.0alpha2/BackupPC-XS-0.20 # make

<<<SKIPPED>>>

Running Mkbootstrap for BackupPC::XS ()
chmod 644 XS.bs
rm -f blib/arch/auto/BackupPC/XS/XS.so
cc -shared -L/usr/local/lib -fstack-protector BackupPC_XS.o bpc_attrib.o bpc_attribCache.o bpc_dirOps.o bpc_fileZIO.o bpc_hashtable.o bpc_lib.o bpc_poolWrite.o bpc_refCount.o zlib/libzlib.a md5/libmd5.a -o blib/arch/auto/BackupPC/XS/XS.so
cc: zlib/libzlib.a: No such file or directory
cc: md5/libmd5.a: No such file or directory
*** [blib/arch/auto/BackupPC/XS/XS.so] Error code 1

Stop in /usr/home/moiseev/backuppc-4.0.0alpha2/BackupPC-XS-0.20.

--
Alexander
Tomasz Chmielewski
2013-09-25 10:41:02 UTC
Permalink
On Wed, 25 Sep 2013 13:39:46 +0400
Post by Alexander Moisseev
BackupPC-XS-0.20 failed to build on FreeBSD 9.1-RELEASE.
(...)
Post by Alexander Moisseev
Running Mkbootstrap for BackupPC::XS ()
chmod 644 XS.bs
rm -f blib/arch/auto/BackupPC/XS/XS.so
cc -shared -L/usr/local/lib -fstack-protector BackupPC_XS.o
bpc_attrib.o bpc_attribCache.o bpc_dirOps.o bpc_fileZIO.o
bpc_hashtable.o bpc_lib.o bpc_poolWrite.o bpc_refCount.o
zlib/libzlib.a: No such file or directory cc: md5/libmd5.a: No such
file or directory *** [blib/arch/auto/BackupPC/XS/XS.so] Error code 1
You need headers for zlib?
--
Tomasz Chmielewski
http://www.ptraveler.com
Alexander Moisseev
2013-09-25 12:20:34 UTC
Permalink
Post by Tomasz Chmielewski
On Wed, 25 Sep 2013 13:39:46 +0400
Post by Alexander Moisseev
BackupPC-XS-0.20 failed to build on FreeBSD 9.1-RELEASE.
(...)
Post by Alexander Moisseev
Running Mkbootstrap for BackupPC::XS ()
chmod 644 XS.bs
rm -f blib/arch/auto/BackupPC/XS/XS.so
cc -shared -L/usr/local/lib -fstack-protector BackupPC_XS.o
bpc_attrib.o bpc_attribCache.o bpc_dirOps.o bpc_fileZIO.o
bpc_hashtable.o bpc_lib.o bpc_poolWrite.o bpc_refCount.o
zlib/libzlib.a: No such file or directory cc: md5/libmd5.a: No such
file or directory *** [blib/arch/auto/BackupPC/XS/XS.so] Error code 1
You need headers for zlib?
I am not familiar with C. Do you mean some C header files are absent?

# ls ./BackupPC-XS-0.20/zlib
MYMETA.yml adler32.c crc32.h inffast.c inflate.c inftrees.h zconf.h zutil.h
Makefile compress.c deflate.c inffast.h inflate.h trees.c zlib.h
Makefile.PL crc32.c deflate.h inffixed.h inftrees.c trees.h zutil.c

# ls ./BackupPC-XS-0.20/md5
MYMETA.yml Makefile Makefile.PL md5.c mdigest.h
Tomasz Chmielewski
2013-09-25 12:39:07 UTC
Permalink
On Wed, 25 Sep 2013 16:20:34 +0400
Post by Alexander Moisseev
Post by Tomasz Chmielewski
You need headers for zlib?
I am not familiar with C. Do you mean some C header files are absent?
# ls ./BackupPC-XS-0.20/zlib
MYMETA.yml adler32.c crc32.h inffast.c
inflate.c inftrees.h zconf.h zutil.h
Makefile compress.c deflate.c inffast.h
inflate.h trees.c zlib.h Makefile.PL
crc32.c deflate.h inffixed.h inftrees.c
trees.h zutil.c
# ls ./BackupPC-XS-0.20/md5
MYMETA.yml Makefile Makefile.PL md5.c
mdigest.h
Correct - some C headers files don't seem to be present on your
system.

Can't help you with FreeBSD, but I believe it should have a similar
methodology as on Linux: the headers are typically shipped in
development packages, which you have to install yourself.

For example, on Debian (Linux), the files you are after would be be
in "zlib1g-dev" package. There should be something equivalent for
FreeBSD.
--
Tomasz Chmielewski
http://www.ptraveler.com
Holger Parplies
2013-09-25 23:04:46 UTC
Permalink
Alexander Moisseev
2013-09-26 05:39:11 UTC
Permalink
Post by unknown
Neither can I, but perhaps you could post your Makefiles for the two
directories and someone who has done a successful build on Linux could
compare with his ...
The attached zip file contains generated Makefiles.
Craig Barratt
2013-09-26 05:42:53 UTC
Permalink
Alexander,

For some reason the generated Makefile doesn't do a sub-make in the md5 and
zlib subdirectories. They should be self contained - it shouldn't depend
upon any standard libraries or include files.

Can you start with a clean (newly) unpacked archive, and replace
Makefile.PL with the attached version? After you replace Makefile.PL,
continue with the usual build steps (perl Makefile.PL ; make).

Craig
Alexander Moisseev
2013-09-26 05:58:41 UTC
Permalink
It works. Thanks.

unknown
1970-01-01 00:00:00 UTC
Permalink
Hi,
Post by Tomasz Chmielewski
On Wed, 25 Sep 2013 16:20:34 +0400
Post by Alexander Moisseev
Post by Tomasz Chmielewski
You need headers for zlib?
I am not familiar with C. Do you mean some C header files are absent?
[...]
Correct - some C headers files don't seem to be present on your
system.
really? I was guessing that a dependency is incorrectly generated (or rather
not generated). I can't see the *libraries* libzlib.a and libmd5.a being
even attempted to be built, and surely they should be!?

In the attached zip file (which I resent having to unpack, but YMMV) I see a
warning concerning netinet/ip.h, which I don't fully understand, but which
doesn't seem relevant for zlib and md5 code.

Makefiles for BackupPC::XS::zlib and BackupPC::XS::md5 are built, but I never
see anything done with them before the attempt to link zlib/libzlib.a and
md5/libmd5.a into BackupPC_XS.o (relative to directory BackupPC/XS). Missing
header files should trigger an error rather than be silently ignored.
Post by Tomasz Chmielewski
Can't help you with FreeBSD,
Neither can I, but perhaps you could post your Makefiles for the two
directories and someone who has done a successful build on Linux could
compare with his ...

Hope that helps.

Regards,
Holger
Loading...