Re: [Bacula-users] Bacula SD on a QNAP TS-231 [SOLVED]

2018-10-30 Thread Radosław Korzeniewski
Hello,

śr., 24 paź 2018 o 08:46 Andrea Venturoli  napisał(a):

> On 10/22/18 5:38 PM, Radosław Korzeniewski wrote:
> > _ this environment does not provide OpenSSL (or perhaps configure
> > doesn't find it?), so it will be disabled; however some code in
> > BSOCKCORE::close() in src/lib/bsockcore.c is not guarded by the
> proper
> > #ifdef HAVE_TLS, so you'll get linker errors. Just remove this code
> (by
> > commenting it or putting the right #if or just deleting those lines);
> >
> >
> > What version of Bacula do you compile?
>
> 9.2.1.
>
>
>
> > Could you provide a proper code for which BSOCKCORE::close() which works
> for you?
>
> Sure.
>
> The following patch is required in order to compile that version of
> bacula *WITHOUT* OpenSSL.
>
>
What I can find in git repo this issue was fixed at
commit: 2a271769c3e5fe348e2c6988e605963735a97fe4

I think it is not yet released and will be at 9.2.2.

best regards
-- 
Radosław Korzeniewski
rados...@korzeniewski.net
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] Bacula SD on a QNAP TS-231 [SOLVED]

2018-10-30 Thread Radosław Korzeniewski
Awesome, thanks!

śr., 24 paź 2018 o 08:46 Andrea Venturoli  napisał(a):

> On 10/22/18 5:38 PM, Radosław Korzeniewski wrote:
> > _ this environment does not provide OpenSSL (or perhaps configure
> > doesn't find it?), so it will be disabled; however some code in
> > BSOCKCORE::close() in src/lib/bsockcore.c is not guarded by the
> proper
> > #ifdef HAVE_TLS, so you'll get linker errors. Just remove this code
> (by
> > commenting it or putting the right #if or just deleting those lines);
> >
> >
> > What version of Bacula do you compile?
>
> 9.2.1.
>
>
>
> > Could you provide a proper code for which BSOCKCORE::close() which works
> for you?
>
> Sure.
>
> The following patch is required in order to compile that version of
> bacula *WITHOUT* OpenSSL.
>
> % diff -u src/lib/bsockcore.c.orig  src/lib/bsockcore.c
> --- src/lib/bsockcore.c.orig2018-10-24 08:41:49.443835000 +0200
> +++ src/lib/bsockcore.c 2018-10-24 08:42:18.270196000 +0200
> @@ -935,12 +935,14 @@
>  bsock->set_closed();
>  bsock->set_terminated();
>  if (!bsock->m_duped) {
> +#ifdef HAVE_TLS
> /* Shutdown tls cleanly. */
> if (bsock->tls) {
>tls_bsock_shutdown(bsock);
>free_tls_connection(bsock->tls);
>bsock->tls = NULL;
> }
> +#endif
>
>   #ifdef HAVE_WIN32
> if (!bsock->is_timed_out()) {
>
>
> While I think this patch is safe, I don't want to be held responsible
> for side effects :) I don't know the whole source enough and I didn't
> test it with SSL enabled.
>
>   bye
> av.
>


-- 
Radosław Korzeniewski
rados...@korzeniewski.net
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] Bacula SD on a QNAP TS-231 [SOLVED]

2018-10-24 Thread Andrea Venturoli

On 10/22/18 5:38 PM, Radosław Korzeniewski wrote:

_ this environment does not provide OpenSSL (or perhaps configure
doesn't find it?), so it will be disabled; however some code in
BSOCKCORE::close() in src/lib/bsockcore.c is not guarded by the proper
#ifdef HAVE_TLS, so you'll get linker errors. Just remove this code (by
commenting it or putting the right #if or just deleting those lines);


What version of Bacula do you compile?


9.2.1.




Could you provide a proper code for which BSOCKCORE::close() which works for 
you?


Sure.

The following patch is required in order to compile that version of 
bacula *WITHOUT* OpenSSL.


% diff -u src/lib/bsockcore.c.orig  src/lib/bsockcore.c
--- src/lib/bsockcore.c.orig2018-10-24 08:41:49.443835000 +0200
+++ src/lib/bsockcore.c 2018-10-24 08:42:18.270196000 +0200
@@ -935,12 +935,14 @@
bsock->set_closed();
bsock->set_terminated();
if (!bsock->m_duped) {
+#ifdef HAVE_TLS
   /* Shutdown tls cleanly. */
   if (bsock->tls) {
  tls_bsock_shutdown(bsock);
  free_tls_connection(bsock->tls);
  bsock->tls = NULL;
   }
+#endif

 #ifdef HAVE_WIN32
   if (!bsock->is_timed_out()) {


While I think this patch is safe, I don't want to be held responsible 
for side effects :) I don't know the whole source enough and I didn't 
test it with SSL enabled.


 bye
av.


___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] Bacula SD on a QNAP TS-231 [SOLVED]

2018-10-22 Thread Radosław Korzeniewski
Hello,

niedz., 21 paź 2018 o 19:49 Andrea Venturoli  napisał(a):

> _ this environment does not provide OpenSSL (or perhaps configure
> doesn't find it?), so it will be disabled; however some code in
> BSOCKCORE::close() in src/lib/bsockcore.c is not guarded by the proper
> #ifdef HAVE_TLS, so you'll get linker errors. Just remove this code (by
> commenting it or putting the right #if or just deleting those lines);
>

What version of Bacula do you compile? Could you provide a proper code for
which BSOCKCORE::close() which works for you?

Thanks.
-- 
Radosław Korzeniewski
rados...@korzeniewski.net
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] Bacula SD on a QNAP TS-231 [SOLVED]

2018-10-21 Thread Andrea Venturoli

On 10/17/18 1:35 PM, Josh Fisher wrote:

I believe the NAS you mention uses a Marvell chip, so you will need the 
cross-compiler at:

https://sourceforge.net/projects/qosgpl/files/QNAP%20NAS%20Tool%20Chains/
This should allow building the bacula-sd and library binaries targeting 
the Marvell chip from a Linux host.


Thanks for pointing me in the right direction!
This got me up and running, although it wasn't THAT easy (*): now I'm 
smoke testing my bacula-sd on the NAS. :-D


 bye & thanks
av.

*) Some hints, in case other people as mad as me :) want to try this:

_ when cross compiling, configure always fails on a check on setpgrp: 
just remove the whole check and let ac_cv_func_setpgrp_void=no;


_ for some reason bacula lets you build either everything or only the 
file daemon; there's no option to build only the SD. So you'll need to 
get and compile sqlite3, just to be able to compile the director (which 
you won't use!);


_ this environment does not provide OpenSSL (or perhaps configure 
doesn't find it?), so it will be disabled; however some code in 
BSOCKCORE::close() in src/lib/bsockcore.c is not guarded by the proper 
#ifdef HAVE_TLS, so you'll get linker errors. Just remove this code (by 
commenting it or putting the right #if or just deleting those lines);


_ the static-bacula-sd won't work: "status storage" will get the proper 
result, but as soon as you launch a job it will dump core (something to 
do with name resolution AFAICT). Use the non-static bacula-sd binary.



___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users