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.
Created attachment 308897 [details] Burp init script tailored for gentoo
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.
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.
Created attachment 386214 [details] app-backup/burp-1.4.24.ebuild
Created attachment 386216 [details] updated init script
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.
Jared, I've pushed your changes into my overlay, although I haven't tested it, yet.
Created attachment 388348 [details, diff] burp-1.4.26-tinfo.patch
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.
Created attachment 388352 [details, diff] burp-1.4.26-tinfo.patch Not tested, but this ought to work. :)
(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.
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.
Created attachment 389028 [details] app-backup/burp-1.4.26.ebuild Apply 1.4.26-tinfo.patch and call eautoreconf.
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.
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?
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?
+ 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. +
(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.
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
(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.)
Created attachment 390092 [details, diff] 1.4.26-bedup-conf-path.patch
Created attachment 390094 [details, diff] 1.3.48-tinfo.patch
Created attachment 390096 [details, diff] 1.3.48-bedup-conf-path.patch
Created attachment 390098 [details] burp.initd
Created attachment 390100 [details] app-backup/burp-1.4.26.ebuild
Created attachment 390102 [details] app-backup/burp-1.3.48.ebuild
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.
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