Re: [fossil-users] smtp.c build failures

2018-06-28 Thread Martin Gagnon
On Thu, Jun 28, 2018 at 03:26:42PM -0400, Richard Hipp wrote:
> On 6/28/18, Martin Gagnon  wrote:
> >
> > To use the ns_* function, you needs to install libbind from packages:
> > pkg_add -r libbind.
> >
> 
> I'm thinking I will probably end up having to write my own DNS query
> response parser
> 

Ok, that's would be ideal I guess (for portability).

But still, FYI: I just manage to compile and link it successfully with
libbind on OpenBSD.

I don't know how to configure autosetup to detect it automatically, but
I just had to edit the Makefile manually after the "./configure" as
the following:

- addition to CFLAGS variable:
-I/usr/local/include/bind

- addition to LIB variable:  
-L/usr/local/lib/libbind -lbind

-- 
Martin G.
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] smtp.c build failures

2018-06-28 Thread Richard Hipp
On 6/28/18, Martin Gagnon  wrote:
>
> To use the ns_* function, you needs to install libbind from packages:
> pkg_add -r libbind.
>

I'm thinking I will probably end up having to write my own DNS query
response parser

-- 
D. Richard Hipp
d...@sqlite.org
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] smtp.c build failures

2018-06-28 Thread Martin Gagnon
On Thu, Jun 28, 2018 at 11:58:55AM -0700, jungle Boogie wrote:
> On 28 June 2018 at 11:42, Richard Hipp  wrote:
> > On 6/28/18, jungle Boogie  wrote:
> >> Hi All,
> >>
> >> I know it's still very early on to make use of the new smtp logic, but
> >> I thought I'd report these issues. Is anyone else experiencing issues
> >> with compiling?
> >
> > Did you rerun ./configure?
> >
> > fossil clean -x
> > ./configure
> > make
> >
> 
> The build took place in a separate directory, outside my trunk version
> of Fossil.
> 
> > If you still get errors then, please let me know.  But first, figure
> > out what library OpenBSD wants to link against in order to pick up the
> > DNS parsing routines.
> 
> Does this help?
> http://man.openbsd.org/man3/getrrsetbyname.3

To use the ns_* function, you needs to install libbind from packages:
pkg_add -r libbind.

Then, I guess we will needs to modify our autosetup script, so it detect
if libbind is installed. If it's the case, it needs to add:
- /usr/local/include/bind to include path
- /usr/local/lib/bind to lib path
- add -lbind to link agains libbind.

I got it to compile, I still have an issue with the linking
part.

-- 
Martin G.
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] smtp.c build failures

2018-06-28 Thread Richard Hipp
On 6/28/18, jungle Boogie  wrote:
>
> The res_query() function provides an interface to the server query
> mechanism. It constructs a query, sends it to the local server, awaits
> a response, and makes preliminary checks on the reply. The query
> requests information of the specified type and class for the specified
> fully qualified domain name dname. The reply message is left in the
> answer buffer with length anslen supplied by the caller. Values for
> the class and type fields are defined in .
>
> I think that's what you want!

Indeed.

So can you write up a little subroutine to parse the binary DNS reply
and extract the name of the MX host for us?

-- 
D. Richard Hipp
d...@sqlite.org
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] smtp.c build failures

2018-06-28 Thread jungle Boogie
On 28 June 2018 at 12:07, Richard Hipp  wrote:
> On 6/28/18, jungle Boogie  wrote:
>>
>> Does this help?
>> http://man.openbsd.org/man3/getrrsetbyname.3
>>
>
> That seems to be an OpenBSD-only library function.  So, no, it doesn't
> really help.
>
> Does OpenBSD have req_query() at least?  I suppose I could write my
> own DNS record parser.  (sigh...)
>

https://man.openbsd.org/resolver.3

res_query, res_search, res_mkquery, res_send, res_init, dn_comp, dn_expand —
resolver routines

The res_query() function provides an interface to the server query
mechanism. It constructs a query, sends it to the local server, awaits
a response, and makes preliminary checks on the reply. The query
requests information of the specified type and class for the specified
fully qualified domain name dname. The reply message is left in the
answer buffer with length anslen supplied by the caller. Values for
the class and type fields are defined in .

I think that's what you want!


> --
> D. Richard Hipp
> d...@sqlite.org



---
inum: 883510009027723
sip: jungleboo...@sip2sip.info
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] smtp.c build failures

2018-06-28 Thread Richard Hipp
On 6/28/18, jungle Boogie  wrote:
>
> Does this help?
> http://man.openbsd.org/man3/getrrsetbyname.3
>

That seems to be an OpenBSD-only library function.  So, no, it doesn't
really help.

Does OpenBSD have req_query() at least?  I suppose I could write my
own DNS record parser.  (sigh...)

-- 
D. Richard Hipp
d...@sqlite.org
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] smtp.c build failures

2018-06-28 Thread jungle Boogie
On 28 June 2018 at 11:42, Richard Hipp  wrote:
> On 6/28/18, jungle Boogie  wrote:
>> Hi All,
>>
>> I know it's still very early on to make use of the new smtp logic, but
>> I thought I'd report these issues. Is anyone else experiencing issues
>> with compiling?
>
> Did you rerun ./configure?
>
> fossil clean -x
> ./configure
> make
>

The build took place in a separate directory, outside my trunk version
of Fossil.

> If you still get errors then, please let me know.  But first, figure
> out what library OpenBSD wants to link against in order to pick up the
> DNS parsing routines.

Does this help?
http://man.openbsd.org/man3/getrrsetbyname.3

>
> --
> D. Richard Hipp
> d...@sqlite.org
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] smtp.c build failures

2018-06-28 Thread Richard Hipp
On 6/28/18, jungle Boogie  wrote:
> Hi All,
>
> I know it's still very early on to make use of the new smtp logic, but
> I thought I'd report these issues. Is anyone else experiencing issues
> with compiling?

Did you rerun ./configure?

fossil clean -x
./configure
make

If you still get errors then, please let me know.  But first, figure
out what library OpenBSD wants to link against in order to pick up the
DNS parsing routines.

-- 
D. Richard Hipp
d...@sqlite.org
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users