Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 411973 - app-bacup/burp - Backup client/server for Unix and Windows systems
Summary: app-bacup/burp - Backup client/server for Unix and Windows systems
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal enhancement
Assignee: Amadeusz Żołnowski (RETIRED)
URL:
Whiteboard:
Keywords: EBUILD
Depends on:
Blocks:
 
Reported: 2012-04-14 14:43 UTC by Aurelien Reynaud
Modified: 2014-12-01 16:35 UTC (History)
6 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
ebuild for burp-1.3.2 (burp-1.3.2.ebuild,3.47 KB, text/plain)
2012-04-14 14:43 UTC, Aurelien Reynaud
Details
Burp init script tailored for gentoo (burp.initd,994 bytes, text/plain)
2012-04-14 14:45 UTC, Aurelien Reynaud
Details
app-backup/burp-1.4.24.ebuild (burp-1.4.24.ebuild,1.99 KB, text/plain)
2014-10-08 03:16 UTC, Jared B.
Details
updated init script (burp.initd,589 bytes, text/plain)
2014-10-08 03:18 UTC, Jared B.
Details
burp-1.4.26-tinfo.patch (burp-1.4.26-tinfo.patch,427 bytes, patch)
2014-11-02 19:47 UTC, Jeroen Roovers (RETIRED)
Details | Diff
burp-1.4.26-tinfo.patch (411973-burp-1.4.26-tinfo.patch,616 bytes, patch)
2014-11-02 20:05 UTC, Jeroen Roovers (RETIRED)
Details | Diff
1.4.26-tinfo.patch (1.4.26-tinfo.patch,767 bytes, patch)
2014-11-10 17:01 UTC, Amadeusz Żołnowski (RETIRED)
Details | Diff
app-backup/burp-1.4.26.ebuild (burp-1.4.26.ebuild,2.10 KB, text/plain)
2014-11-10 17:03 UTC, Amadeusz Żołnowski (RETIRED)
Details
1.4.26-bedup-conf-path.patch (1.4.26-bedup-conf-path.patch,1.58 KB, patch)
2014-11-23 12:37 UTC, Amadeusz Żołnowski (RETIRED)
Details | Diff
1.3.48-tinfo.patch (1.3.48-tinfo.patch,795 bytes, patch)
2014-11-23 12:38 UTC, Amadeusz Żołnowski (RETIRED)
Details | Diff
1.3.48-bedup-conf-path.patch (1.3.48-bedup-conf-path.patch,1.64 KB, patch)
2014-11-23 12:38 UTC, Amadeusz Żołnowski (RETIRED)
Details | Diff
burp.initd (burp.initd,747 bytes, text/plain)
2014-11-23 12:40 UTC, Amadeusz Żołnowski (RETIRED)
Details
app-backup/burp-1.4.26.ebuild (burp-1.4.26.ebuild,2.41 KB, text/plain)
2014-11-23 12:41 UTC, Amadeusz Żołnowski (RETIRED)
Details
app-backup/burp-1.3.48.ebuild (burp-1.3.48.ebuild,2.41 KB, text/plain)
2014-11-23 12:43 UTC, Amadeusz Żołnowski (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Aurelien Reynaud 2012-04-14 14:43:40 UTC
Created attachment 308895 [details]
ebuild for burp-1.3.2

Hello!

Please find attached burp-1.3.2.ebuild.

Burp is a network backup and restore program. It uses librsync in order to save network traffic and to save on the amount of space that is used by each backup. It also uses VSS (Volume Shadow Copy Service) to make snapshots when backing up Windows computers. 

Please note that I tried to make running it as secure as possible by having it run as non-root user. That is why the ebuild looks so complex at first sight: files and directories need to have the right owners and permissions.

I suggest app-backup/burp as category.
Comment 1 Aurelien Reynaud 2012-04-14 14:45:56 UTC
Created attachment 308897 [details]
Burp init script tailored for gentoo
Comment 2 Amadeusz Żołnowski (RETIRED) gentoo-dev 2014-08-16 11:35:37 UTC
I have incorporated some parts of your ebuild into mine I have written some time ago. It's available in my overlay:

# layman -a aidecoe

I haven't tested burp, yet. If you could test the ebuild it would hasten adding it the portage tree.
Comment 3 Jared B. 2014-10-08 03:16:03 UTC
Aurelien, Amadeusz,

Thanks for the ebuild.  I've been playing around with burp a little myself recently, and found a few issues with the build and init script that I wanted to report.

1. burp user/group creation wasn't working right, causing an installation failure.  I had to inherit the user eclass and move enewgroup/user to pkg_setup() (I actually patterned that after the tinyproxy ebuild).

2. The sed condition src_install was missing a trailing slash at the end of the second-to-last line, causing it to fail.

3. The init script simply didn't work for me.  It looks like you must call burp with -c /etc/burp/burp-server.conf in order to launch the server; otherwise, it appears to read the client (burp.conf) file by default.  I think this would be more ideally addressed by a config variable in /etc/conf.d/burp or something rather than hardcoding it in the init script, but this works for now.

4. The checkconfig() section doesn't seem to be needed.  It appears that burp will do this itself the first time it's run in server mode.

5. I'm saving the weirdest for last:  on at least my desktop, burp will fail to compile the bain burp binary if ncurses is built with tinfo support.  Ie., burp depends on sys-libs/ncurses[-tinfo], which makes no damn sense, and is especially problematic because I have another package installed that actually depends on tinfo - it's impossible for me to have both packages installed at the same time.

Any ideas on what's up that last one, or, better, how to fix it.  That's definitely an issue for me, and I have no idea how to work around it.

I'm attaching an updated ebuild and init script to address the issues above, but the tinfo issue should certainly be addressed before this is added to portage.
Comment 4 Jared B. 2014-10-08 03:16:40 UTC
Created attachment 386214 [details]
app-backup/burp-1.4.24.ebuild
Comment 5 Jared B. 2014-10-08 03:18:31 UTC
Created attachment 386216 [details]
updated init script
Comment 6 Amadeusz Żołnowski (RETIRED) gentoo-dev 2014-10-08 07:27:49 UTC
Jared, thank you for testing, pointing out and fixing bugs. :-) I will apply it into my overlay. I hope I will find some more time soon to test it myself and eventually commit to the tree. Wrt tinfo problem I will take a look at it and try to fix.
Comment 7 Amadeusz Żołnowski (RETIRED) gentoo-dev 2014-10-12 20:35:55 UTC
Jared, I've pushed your changes into my overlay, although I haven't tested it, yet.
Comment 8 Jeroen Roovers (RETIRED) gentoo-dev 2014-11-02 19:47:40 UTC
Created attachment 388348 [details, diff]
burp-1.4.26-tinfo.patch
Comment 9 Jeroen Roovers (RETIRED) gentoo-dev 2014-11-02 19:58:10 UTC
Comment on attachment 388348 [details, diff]
burp-1.4.26-tinfo.patch

>--- a/configure.ac
>+++ b/configure.ac
>@@ -1203,7 +1203,8 @@
> fi
> 
> AC_CHECK_HEADERS(ncurses.h)
>-AC_CHECK_LIB(ncurses, curs_set, [NCURSES_LIBS="-lncurses"])
>+AC_CHECK_LIB(ncurses, endwin, [NCURSES_LIBS="-lncurses"])
>+AC_SEARCH_LIBS(curs_set, tinfo ncurses, [NCURSES_LIBS="$NCURSES_LIBS $ac_res"])
> have_ncurses=no

Adding more to NCURSES_LIBS above makes the test below not fail but complain:

> if test x$NCURSES_LIBS = x-lncurses; then
>    AC_DEFINE(HAVE_NCURSES, 1, [Defined to 1 if libncurses was found])


checking ncurses.h usability... yes
checking ncurses.h presence... yes
checking for ncurses.h... yes
checking for endwin in -lncurses... yes
checking for library containing curs_set... -ltinfo
./configure: line 23792: test: too many arguments

but now I've removed the ebuild again.
Comment 10 Jeroen Roovers (RETIRED) gentoo-dev 2014-11-02 20:05:32 UTC
Created attachment 388352 [details, diff]
burp-1.4.26-tinfo.patch

Not tested, but this ought to work. :)
Comment 11 Amadeusz Żołnowski (RETIRED) gentoo-dev 2014-11-05 09:11:58 UTC
(In reply to Jeroen Roovers from comment #10)
> Created attachment 388352 [details, diff] [details, diff]
> burp-1.4.26-tinfo.patch
> 
> Not tested, but this ought to work. :)

Thank you a lot! :-) I will test it later.
Comment 12 Amadeusz Żołnowski (RETIRED) gentoo-dev 2014-11-10 17:01:16 UTC
Created attachment 389026 [details, diff]
1.4.26-tinfo.patch

Correct patch to set "have_ncurses" to "yes" or "no" depending on whether ncurses is included or not.
Comment 13 Amadeusz Żołnowski (RETIRED) gentoo-dev 2014-11-10 17:03:10 UTC
Created attachment 389028 [details]
app-backup/burp-1.4.26.ebuild

Apply 1.4.26-tinfo.patch and call eautoreconf.
Comment 14 Amadeusz Żołnowski (RETIRED) gentoo-dev 2014-11-10 17:05:31 UTC
Thank you, Jeroen. After minor modifications of your patch burp compiles fine with ncurses[tinfo], now.

I have pushed burp bump and tinfo related changes into my overlay.
Comment 15 Marcin Mirosław 2014-11-11 19:55:40 UTC
I noticed two issues, first: if burp stops working after checking file init scripts assume that it starts correctly (--wait 500 fixes it for me):
# /etc/init.d/burp start
 * Starting burp server ...                             [ ok ]
# /etc/init.d/burp stop
 * Stopping burp server ...
 * start-stop-daemon: no matching processes found       [ ok ]

With --wait:
# /etc/init.d/burp start
 * Starting burp server ...
 * start-stop-daemon: caught an interrupt
 * start-stop-daemon: /usr/sbin/burp died
 * Failed to start burp server                          [ !! ]
 * ERROR: burp failed to start


Second issue is default location of lockfile, user burp can't write to this location:
2014-11-11T20:45:22.263907+01:00 jowisz burp[16009]: Could not get lockfile.
2014-11-11T20:45:22.264024+01:00 jowisz burp[16009]: Another process is probably running,
2014-11-11T20:45:22.264090+01:00 jowisz burp[16009]: or you do not have permissions to write to /run/lock/burp-server.lock.

Can I see correctly that there is no init script for client daemon?
Comment 16 Marcin Mirosław 2014-11-12 10:21:56 UTC
bedup by default is using /etc/burp/burp.conf but:
$ bedup
2014-11-12 11:21:06: bedup[4500] /etc/burp/burp.conf is not a server config file

So I must manually provide path to burp-server.conf, is it possible to change default path?
Comment 17 Amadeusz Żołnowski (RETIRED) gentoo-dev 2014-11-18 21:00:05 UTC
+  18 Nov 2014; Amadeusz Żołnowski <aidecoe@gentoo.org> burp-1.4.26.ebuild,
+  files/burp.initd:
+  Change location of a lock file to a writable 'burp' subdirectory. Create
+  /run/lock/burp before running burp-server.
+
+  Rels bug #411973. Thanks to Marcin Mirosław for pointing that out.
+
Comment 18 Amadeusz Żołnowski (RETIRED) gentoo-dev 2014-11-18 21:06:45 UTC
(In reply to Marcin Mirosław from comment #16)
> bedup by default is using /etc/burp/burp.conf but:
> $ bedup
> 2014-11-12 11:21:06: bedup[4500] /etc/burp/burp.conf is not a server config
> file
> 
> So I must manually provide path to burp-server.conf, is it possible to
> change default path?

Just for bedup - probably not. It seems we have to rethink default location of burp server config.
Comment 19 Marcin Mirosław 2014-11-18 21:54:30 UTC
Thanks Amadeusz for fix.
I can see:
+       if [ ! -d /run/lock/burp ]; then
+               mkdir -m 0775 /run/lock/burp
+               chown burp:burp /run/lock/burp
+       fi

wouldn't be easier to use checkpath?
+ checkpath -d -o burp:burp /run/lock/burp
Comment 20 Amadeusz Żołnowski (RETIRED) gentoo-dev 2014-11-21 09:09:59 UTC
(In reply to Marcin Mirosław from comment #16)
> bedup by default is using /etc/burp/burp.conf but:
> $ bedup
> 2014-11-12 11:21:06: bedup[4500] /etc/burp/burp.conf is not a server config
> file
> 
> So I must manually provide path to burp-server.conf, is it possible to
> change default path?

I have changed path in bedup source and man page. Could you test it? New version of an ebuild is already available in my overlay. (I haven't done revbump since it's still experimental ebuild, so you have to rebuild - emerge -1 burp.)
Comment 21 Amadeusz Żołnowski (RETIRED) gentoo-dev 2014-11-23 12:37:39 UTC
Created attachment 390092 [details, diff]
1.4.26-bedup-conf-path.patch
Comment 22 Amadeusz Żołnowski (RETIRED) gentoo-dev 2014-11-23 12:38:16 UTC
Created attachment 390094 [details, diff]
1.3.48-tinfo.patch
Comment 23 Amadeusz Żołnowski (RETIRED) gentoo-dev 2014-11-23 12:38:49 UTC
Created attachment 390096 [details, diff]
1.3.48-bedup-conf-path.patch
Comment 24 Amadeusz Żołnowski (RETIRED) gentoo-dev 2014-11-23 12:40:37 UTC
Created attachment 390098 [details]
burp.initd
Comment 25 Amadeusz Żołnowski (RETIRED) gentoo-dev 2014-11-23 12:41:21 UTC
Created attachment 390100 [details]
app-backup/burp-1.4.26.ebuild
Comment 26 Amadeusz Żołnowski (RETIRED) gentoo-dev 2014-11-23 12:43:08 UTC
Created attachment 390102 [details]
app-backup/burp-1.3.48.ebuild
Comment 27 Amadeusz Żołnowski (RETIRED) gentoo-dev 2014-11-23 12:44:36 UTC
I've created an ebuild for 1.3.48 as well, because it's the one which is latest stable. 1.4.26 is said to be a stable candidate.
Comment 28 Amadeusz Żołnowski (RETIRED) gentoo-dev 2014-12-01 16:35:39 UTC
New package has been added to the Portage tree.  Thank you all for
contribution!  Any further improvement is welcome, but please create new report
for it.  I will remove burp package from my overlay soon.

Excerpt from ChangeLog:

01 Dec 2014; Amadeusz Żołnowski <aidecoe@gentoo.org> +burp-1.3.8.ebuild,
+burp-1.3.48.ebuild, +burp-1.4.26.ebuild, +files/1.3.8-bedup-conf-path.patch,
+files/1.3.48-bedup-conf-path.patch, +files/1.3.48-tinfo.patch,
+files/1.4.26-bedup-conf-path.patch, +files/1.4.26-tinfo.patch,
+files/burp.initd, +metadata.xml:
Add initial version of the burp package. Import ebuilds from the aidecoe's
overlay [1]. Add various versions at once: 1.3.48 is the latest stable
version, 1.4.26 is the latest stable candidate and 1.3.8 is an old version
for people who use burp on Debian and want to have the same version.

Thanks for contribution to (in order by first name):
- Aurelien Reynaud <aurelien@wattapower.net>
- Jared B. <nitro@legroom.net>
- Jeroen Roovers <jer@gentoo.org>
- Marcin Mirosław <bug@mejor.pl>

Thanks to perfinion for review.

[1] https://github.com/aidecoe/aidecoe-overlay